mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-09 21:47:59 +08:00
🛸 Sync 2026-10-12 19:55:25
This commit is contained in:
1 parent
accbfee648
commit
8247b3bbae
16 files changed
+42
-95
No files matched your search
+2
-2
@@ -5,13 +5,13 @@ PKG_SHORT_SHA:=bc76c13
|
|||||||
PKG_COMMIT_DATE:=2026.10.11
|
PKG_COMMIT_DATE:=2026.10.11
|
||||||
|
|
||||||
PKG_VERSION:=$(PKG_COMMIT_DATE)~$(PKG_SHORT_SHA)
|
PKG_VERSION:=$(PKG_COMMIT_DATE)~$(PKG_SHORT_SHA)
|
||||||
PKG_RELEASE:=9
|
PKG_RELEASE:=10
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-alpha-$(PKG_SHORT_SHA).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-alpha-$(PKG_SHORT_SHA).tar.gz
|
||||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-alpha-$(PKG_SHORT_SHA)
|
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-alpha-$(PKG_SHORT_SHA)
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-alpha-$(PKG_SHORT_SHA)
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-alpha-$(PKG_SHORT_SHA)
|
||||||
PKG_SOURCE_URL:=https://github.com/kenzok8/openwrt-clashoo/releases/download/mihomo-src
|
PKG_SOURCE_URL:=https://github.com/kenzok8/openwrt-clashoo/releases/download/mihomo-src
|
||||||
PKG_SOURCE_VERSION:=ee4c1d93df08d24d6006d5ce8547fee5d75ce99b
|
PKG_SOURCE_VERSION:=29c93e5739479dc14c0dea398465f3bc17026944
|
||||||
PKG_HASH:=skip
|
PKG_HASH:=skip
|
||||||
PKG_BUILD_VERSION:=alpha-$(PKG_SHORT_SHA)
|
PKG_BUILD_VERSION:=alpha-$(PKG_SHORT_SHA)
|
||||||
|
|
||||||
|
|||||||
@@ -2261,7 +2261,6 @@ set clashoo_china6 {
|
|||||||
2406:840:9900::/42,
|
2406:840:9900::/42,
|
||||||
2406:840:9940::/43,
|
2406:840:9940::/43,
|
||||||
2406:840:9960::/47,
|
2406:840:9960::/47,
|
||||||
2406:840:9963::/48,
|
|
||||||
2406:840:9965::/48,
|
2406:840:9965::/48,
|
||||||
2406:840:9968::/46,
|
2406:840:9968::/46,
|
||||||
2406:840:996d::/48,
|
2406:840:996d::/48,
|
||||||
@@ -3059,6 +3058,7 @@ set clashoo_china6 {
|
|||||||
2408:4008::/29,
|
2408:4008::/29,
|
||||||
2408:4010::/30,
|
2408:4010::/30,
|
||||||
2408:4014::/31,
|
2408:4014::/31,
|
||||||
|
2408:4016:1::/48,
|
||||||
2408:4016:2::/47,
|
2408:4016:2::/47,
|
||||||
2408:4016:4::/46,
|
2408:4016:4::/46,
|
||||||
2408:4016:8::/45,
|
2408:4016:8::/45,
|
||||||
@@ -3329,7 +3329,11 @@ set clashoo_china6 {
|
|||||||
2a0a:d685::/40,
|
2a0a:d685::/40,
|
||||||
2a0a:d685:100::/41,
|
2a0a:d685:100::/41,
|
||||||
2a0a:d685:180::/42,
|
2a0a:d685:180::/42,
|
||||||
2a0a:d685:1c0::/43,
|
2a0a:d685:1c0::/44,
|
||||||
|
2a0a:d685:1d1::/48,
|
||||||
|
2a0a:d685:1d2::/47,
|
||||||
|
2a0a:d685:1d4::/46,
|
||||||
|
2a0a:d685:1d8::/45,
|
||||||
2a0a:d685:1e2::/47,
|
2a0a:d685:1e2::/47,
|
||||||
2a0a:d685:1e4::/46,
|
2a0a:d685:1e4::/46,
|
||||||
2a0a:d685:1e8::/45,
|
2a0a:d685:1e8::/45,
|
||||||
|
|||||||
@@ -897,14 +897,7 @@ set clashoo_china {
|
|||||||
58.240.0.0/12,
|
58.240.0.0/12,
|
||||||
59.32.0.0/11,
|
59.32.0.0/11,
|
||||||
59.64.0.0/12,
|
59.64.0.0/12,
|
||||||
59.80.0.0/15,
|
59.80.0.0/14,
|
||||||
59.82.0.0/16,
|
|
||||||
59.83.0.0/17,
|
|
||||||
59.83.144.0/20,
|
|
||||||
59.83.160.0/20,
|
|
||||||
59.83.192.0/19,
|
|
||||||
59.83.224.0/21,
|
|
||||||
59.83.232.0/22,
|
|
||||||
59.107.0.0/17,
|
59.107.0.0/17,
|
||||||
59.107.226.0/24,
|
59.107.226.0/24,
|
||||||
59.107.255.0/24,
|
59.107.255.0/24,
|
||||||
@@ -1636,6 +1629,7 @@ set clashoo_china {
|
|||||||
103.70.236.0/22,
|
103.70.236.0/22,
|
||||||
103.70.252.0/22,
|
103.70.252.0/22,
|
||||||
103.71.0.0/22,
|
103.71.0.0/22,
|
||||||
|
103.71.49.0/24,
|
||||||
103.71.68.0/22,
|
103.71.68.0/22,
|
||||||
103.71.72.0/22,
|
103.71.72.0/22,
|
||||||
103.71.80.0/21,
|
103.71.80.0/21,
|
||||||
@@ -1660,7 +1654,10 @@ set clashoo_china {
|
|||||||
103.72.234.0/23,
|
103.72.234.0/23,
|
||||||
103.72.236.0/22,
|
103.72.236.0/22,
|
||||||
103.72.240.0/20,
|
103.72.240.0/20,
|
||||||
103.73.0.0/19,
|
103.73.0.0/21,
|
||||||
|
103.73.10.0/23,
|
||||||
|
103.73.12.0/22,
|
||||||
|
103.73.16.0/20,
|
||||||
103.73.48.0/22,
|
103.73.48.0/22,
|
||||||
103.73.116.0/22,
|
103.73.116.0/22,
|
||||||
103.73.120.0/22,
|
103.73.120.0/22,
|
||||||
@@ -1751,6 +1748,7 @@ set clashoo_china {
|
|||||||
103.83.64.0/22,
|
103.83.64.0/22,
|
||||||
103.83.72.0/22,
|
103.83.72.0/22,
|
||||||
103.83.112.0/22,
|
103.83.112.0/22,
|
||||||
|
103.83.180.0/22,
|
||||||
103.84.0.0/22,
|
103.84.0.0/22,
|
||||||
103.84.12.0/22,
|
103.84.12.0/22,
|
||||||
103.84.16.0/20,
|
103.84.16.0/20,
|
||||||
@@ -2728,8 +2726,7 @@ set clashoo_china {
|
|||||||
103.235.85.0/24,
|
103.235.85.0/24,
|
||||||
103.235.87.0/24,
|
103.235.87.0/24,
|
||||||
103.235.100.0/22,
|
103.235.100.0/22,
|
||||||
103.235.132.0/22,
|
103.235.128.0/20,
|
||||||
103.235.136.0/21,
|
|
||||||
103.235.144.0/21,
|
103.235.144.0/21,
|
||||||
103.235.184.0/22,
|
103.235.184.0/22,
|
||||||
103.235.192.0/22,
|
103.235.192.0/22,
|
||||||
@@ -2839,6 +2836,7 @@ set clashoo_china {
|
|||||||
103.247.200.0/22,
|
103.247.200.0/22,
|
||||||
103.247.212.0/22,
|
103.247.212.0/22,
|
||||||
103.248.0.0/23,
|
103.248.0.0/23,
|
||||||
|
103.248.64.0/22,
|
||||||
103.248.100.0/22,
|
103.248.100.0/22,
|
||||||
103.248.124.0/22,
|
103.248.124.0/22,
|
||||||
103.248.152.0/22,
|
103.248.152.0/22,
|
||||||
@@ -2953,16 +2951,7 @@ set clashoo_china {
|
|||||||
110.6.0.0/15,
|
110.6.0.0/15,
|
||||||
110.16.0.0/14,
|
110.16.0.0/14,
|
||||||
110.34.40.0/21,
|
110.34.40.0/21,
|
||||||
110.40.0.0/15,
|
110.40.0.0/14,
|
||||||
110.42.0.0/20,
|
|
||||||
110.42.16.0/24,
|
|
||||||
110.42.18.0/23,
|
|
||||||
110.42.20.0/22,
|
|
||||||
110.42.24.0/21,
|
|
||||||
110.42.32.0/19,
|
|
||||||
110.42.64.0/18,
|
|
||||||
110.42.128.0/17,
|
|
||||||
110.43.0.0/16,
|
|
||||||
110.44.12.0/22,
|
110.44.12.0/22,
|
||||||
110.44.144.0/20,
|
110.44.144.0/20,
|
||||||
110.48.0.0/16,
|
110.48.0.0/16,
|
||||||
@@ -2983,20 +2972,7 @@ set clashoo_china {
|
|||||||
110.92.68.0/22,
|
110.92.68.0/22,
|
||||||
110.93.32.0/19,
|
110.93.32.0/19,
|
||||||
110.94.0.0/15,
|
110.94.0.0/15,
|
||||||
110.96.0.0/15,
|
110.96.0.0/11,
|
||||||
110.98.0.0/16,
|
|
||||||
110.100.0.0/14,
|
|
||||||
110.104.0.0/13,
|
|
||||||
110.112.0.0/13,
|
|
||||||
110.120.0.0/16,
|
|
||||||
110.121.0.0/22,
|
|
||||||
110.121.8.0/21,
|
|
||||||
110.121.16.0/20,
|
|
||||||
110.121.32.0/19,
|
|
||||||
110.121.64.0/18,
|
|
||||||
110.121.128.0/17,
|
|
||||||
110.122.0.0/15,
|
|
||||||
110.124.0.0/14,
|
|
||||||
110.152.0.0/14,
|
110.152.0.0/14,
|
||||||
110.156.0.0/15,
|
110.156.0.0/15,
|
||||||
110.165.32.0/19,
|
110.165.32.0/19,
|
||||||
@@ -3063,7 +3039,7 @@ set clashoo_china {
|
|||||||
111.235.160.0/19,
|
111.235.160.0/19,
|
||||||
112.0.0.0/10,
|
112.0.0.0/10,
|
||||||
112.64.0.0/14,
|
112.64.0.0/14,
|
||||||
112.73.232.0/24,
|
112.73.222.0/24,
|
||||||
112.74.0.0/15,
|
112.74.0.0/15,
|
||||||
112.80.0.0/12,
|
112.80.0.0/12,
|
||||||
112.96.0.0/13,
|
112.96.0.0/13,
|
||||||
@@ -3146,12 +3122,7 @@ set clashoo_china {
|
|||||||
114.31.64.0/21,
|
114.31.64.0/21,
|
||||||
114.54.0.0/15,
|
114.54.0.0/15,
|
||||||
114.60.0.0/14,
|
114.60.0.0/14,
|
||||||
114.64.0.0/15,
|
114.64.0.0/14,
|
||||||
114.66.0.0/17,
|
|
||||||
114.66.224.0/22,
|
|
||||||
114.66.236.0/22,
|
|
||||||
114.66.240.0/20,
|
|
||||||
114.67.0.0/16,
|
|
||||||
114.68.0.0/16,
|
114.68.0.0/16,
|
||||||
114.79.64.0/18,
|
114.79.64.0/18,
|
||||||
114.80.0.0/12,
|
114.80.0.0/12,
|
||||||
@@ -3349,7 +3320,6 @@ set clashoo_china {
|
|||||||
117.132.0.0/15,
|
117.132.0.0/15,
|
||||||
117.134.0.0/17,
|
117.134.0.0/17,
|
||||||
117.134.128.0/18,
|
117.134.128.0/18,
|
||||||
117.134.207.0/24,
|
|
||||||
117.134.208.0/23,
|
117.134.208.0/23,
|
||||||
117.134.212.0/23,
|
117.134.212.0/23,
|
||||||
117.134.216.0/22,
|
117.134.216.0/22,
|
||||||
@@ -3460,13 +3430,7 @@ set clashoo_china {
|
|||||||
119.48.0.0/13,
|
119.48.0.0/13,
|
||||||
119.57.0.0/16,
|
119.57.0.0/16,
|
||||||
119.58.0.0/16,
|
119.58.0.0/16,
|
||||||
119.59.128.0/24,
|
119.59.128.0/17,
|
||||||
119.59.130.0/24,
|
|
||||||
119.59.132.0/22,
|
|
||||||
119.59.136.0/21,
|
|
||||||
119.59.144.0/20,
|
|
||||||
119.59.160.0/19,
|
|
||||||
119.59.192.0/18,
|
|
||||||
119.60.0.0/15,
|
119.60.0.0/15,
|
||||||
119.62.0.0/16,
|
119.62.0.0/16,
|
||||||
119.63.32.0/19,
|
119.63.32.0/19,
|
||||||
@@ -3945,14 +3909,7 @@ set clashoo_china {
|
|||||||
140.179.0.0/16,
|
140.179.0.0/16,
|
||||||
140.205.0.0/16,
|
140.205.0.0/16,
|
||||||
140.206.0.0/15,
|
140.206.0.0/15,
|
||||||
140.210.0.0/20,
|
140.210.0.0/16,
|
||||||
140.210.16.0/21,
|
|
||||||
140.210.24.0/22,
|
|
||||||
140.210.28.0/23,
|
|
||||||
140.210.30.0/24,
|
|
||||||
140.210.32.0/19,
|
|
||||||
140.210.64.0/18,
|
|
||||||
140.210.128.0/17,
|
|
||||||
140.224.0.0/16,
|
140.224.0.0/16,
|
||||||
140.237.0.0/16,
|
140.237.0.0/16,
|
||||||
140.240.0.0/16,
|
140.240.0.0/16,
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -2,8 +2,8 @@
|
|||||||
local fs = require "nixio.fs"
|
local fs = require "nixio.fs"
|
||||||
local uci = require 'luci.model.uci'.cursor()
|
local uci = require 'luci.model.uci'.cursor()
|
||||||
|
|
||||||
if fs.access('/etc/config/wizard') then
|
if fs.access('/etc/config/luci') then
|
||||||
autoupgrade_fm = uci:get('wizard', 'default', 'autoupgrade_fm')
|
autoupgrade_fm = uci:get('luci', 'main', 'autoupgrade_fm')
|
||||||
end
|
end
|
||||||
if autoupgrade_fm == '1' then
|
if autoupgrade_fm == '1' then
|
||||||
-%>
|
-%>
|
||||||
|
|||||||
@@ -134,9 +134,9 @@ return view.extend({
|
|||||||
dhcp: uci.get('dhcp', 'lan', 'ignore') === '1' ? '0' : '1',
|
dhcp: uci.get('dhcp', 'lan', 'ignore') === '1' ? '0' : '1',
|
||||||
ipv6: uci.get('network', 'wan6', 'auto') === '0' ? '0' : '1',
|
ipv6: uci.get('network', 'wan6', 'auto') === '0' ? '0' : '1',
|
||||||
https: uci.get('wizard', 'default', 'https') || '0',
|
https: uci.get('wizard', 'default', 'https') || '0',
|
||||||
cookie_p: uci.get('wizard', 'default', 'persistent_cookies') || '1',
|
cookie_p: uci.get('luci', 'main', 'persistent_cookies') || '1',
|
||||||
landing_page: uci.get('luci', 'main', 'landing_page') || 'auto',
|
landing_page: uci.get('luci', 'main', 'landing_page') || 'auto',
|
||||||
autoupgrade_fm: uci.get('wizard', 'default', 'autoupgrade_fm') || '0',
|
autoupgrade_fm: uci.get('luci', 'main', 'autoupgrade_fm') || '0',
|
||||||
coremark: uci.get('wizard', 'default', 'coremark') || '0',
|
coremark: uci.get('wizard', 'default', 'coremark') || '0',
|
||||||
wifi_ssid: baseSsid || (this.hasWireless ? 'Kwrt' : ''),
|
wifi_ssid: baseSsid || (this.hasWireless ? 'Kwrt' : ''),
|
||||||
wifi_key: (ap && ap.key) || ''
|
wifi_key: (ap && ap.key) || ''
|
||||||
@@ -482,7 +482,7 @@ return view.extend({
|
|||||||
|
|
||||||
// I. 页面与会话设置(持久Cookie双向同步至luci系统底层与向导配置包)
|
// I. 页面与会话设置(持久Cookie双向同步至luci系统底层与向导配置包)
|
||||||
if (has(changed, 'cookie_p')) {
|
if (has(changed, 'cookie_p')) {
|
||||||
uci.set('wizard', 'default', 'persistent_cookies', cur.cookie_p);
|
uci.set('luci', 'main', 'persistent_cookies', cur.cookie_p);
|
||||||
}
|
}
|
||||||
if (has(changed, 'landing_page')) {
|
if (has(changed, 'landing_page')) {
|
||||||
uci.set('luci', 'main', 'landing_page', cur.landing_page);
|
uci.set('luci', 'main', 'landing_page', cur.landing_page);
|
||||||
@@ -490,7 +490,7 @@ return view.extend({
|
|||||||
|
|
||||||
// J. 向导专属项(完整保留 autoupgrade_fm 与 coremark)
|
// J. 向导专属项(完整保留 autoupgrade_fm 与 coremark)
|
||||||
if (has(changed, 'autoupgrade_fm')) {
|
if (has(changed, 'autoupgrade_fm')) {
|
||||||
uci.set('wizard', 'default', 'autoupgrade_fm', cur.autoupgrade_fm);
|
uci.set('luci', 'main', 'autoupgrade_fm', cur.autoupgrade_fm);
|
||||||
}
|
}
|
||||||
if (has(changed, 'coremark')) {
|
if (has(changed, 'coremark')) {
|
||||||
uci.set('wizard', 'default', 'coremark', cur.coremark);
|
uci.set('wizard', 'default', 'coremark', cur.coremark);
|
||||||
|
|||||||
@@ -53,9 +53,8 @@ process_shortcut() {
|
|||||||
|
|
||||||
# 配置 HTTPS 访问重定向 (适配 Nginx / Lighttpd / uHTTPd)
|
# 配置 HTTPS 访问重定向 (适配 Nginx / Lighttpd / uHTTPd)
|
||||||
sethttps() {
|
sethttps() {
|
||||||
local cfg="${1:-default}"
|
|
||||||
local https
|
local https
|
||||||
config_get https "$cfg" https 0
|
config_get https default https 0
|
||||||
|
|
||||||
if [ -x /etc/init.d/nginx ] && [ -f /etc/nginx/uci.conf ]; then
|
if [ -x /etc/init.d/nginx ] && [ -f /etc/nginx/uci.conf ]; then
|
||||||
if [ "x${https}" = "x1" ]; then
|
if [ "x${https}" = "x1" ]; then
|
||||||
@@ -120,21 +119,12 @@ start_service() {
|
|||||||
(sleep 5;/sbin/coremark >/dev/null 2>&1) &
|
(sleep 5;/sbin/coremark >/dev/null 2>&1) &
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 2. 持久 Cookie 会话配置同步到 LuCI 底层系统
|
|
||||||
local cookie_p
|
|
||||||
config_get cookie_p default persistent_cookies 1
|
|
||||||
if [ -n "$cookie_p" ]; then
|
|
||||||
[ -z "$(uci -q get luci.sgi)" ] && uci -q set luci.sgi=sgi
|
|
||||||
uci -q set luci.sgi.persistent_cookies="$cookie_p"
|
|
||||||
uci -q commit luci
|
|
||||||
fi
|
|
||||||
|
|
||||||
# 3. 清理并重新配置所有 Shortcuts
|
# 3. 清理并重新配置所有 Shortcuts
|
||||||
clean_shortcuts
|
clean_shortcuts
|
||||||
config_foreach process_shortcut shortcuts
|
config_foreach process_shortcut shortcuts
|
||||||
|
|
||||||
# 4. 设置 HTTPS 重定向
|
# 4. 设置 HTTPS 重定向
|
||||||
sethttps default
|
sethttps
|
||||||
|
|
||||||
# 5. 提交并重载生效服务
|
# 5. 提交并重载生效服务
|
||||||
reload_services
|
reload_services
|
||||||
|
|||||||
@@ -963,7 +963,7 @@ dispatch = function(_http, path) {
|
|||||||
let cookie_name = (http.getenv('HTTPS') == 'on') ? 'sysauth_https' : 'sysauth_http',
|
let cookie_name = (http.getenv('HTTPS') == 'on') ? 'sysauth_https' : 'sysauth_http',
|
||||||
cookie_secure = (http.getenv('HTTPS') == 'on') ? '; secure' : '';
|
cookie_secure = (http.getenv('HTTPS') == 'on') ? '; secure' : '';
|
||||||
|
|
||||||
let cookie_p = uci.get('wizard', 'default', 'cookie_p');
|
let cookie_p = uci.get('luci', 'main', 'persistent_cookies');
|
||||||
if (cookie_p == '0') {
|
if (cookie_p == '0') {
|
||||||
http.header('Set-Cookie', `${cookie_name}=${session.sid}; path=${build_url()}; SameSite=strict; HttpOnly${cookie_secure}`);
|
http.header('Set-Cookie', `${cookie_name}=${session.sid}; path=${build_url()}; SameSite=strict; HttpOnly${cookie_secure}`);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
|
|||||||
|
|
||||||
PKG_NAME:=my-default-settings
|
PKG_NAME:=my-default-settings
|
||||||
PKG_VERSION:=2
|
PKG_VERSION:=2
|
||||||
PKG_RELEASE:=34
|
PKG_RELEASE:=35
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
config status
|
|
||||||
option version '0'
|
|
||||||
option base '1'
|
|
||||||
@@ -2,5 +2,5 @@
|
|||||||
|
|
||||||
[ "${ACTION}" = "add" ] && {
|
[ "${ACTION}" = "add" ] && {
|
||||||
/sbin/wifi config
|
/sbin/wifi config
|
||||||
[[ -z "$(uci -q get base_config.@status[0].wifi)" ]] && . /sbin/mywifi &
|
[[ -z "$(uci -q get system.@status[0].wifi)" ]] && . /sbin/mywifi &
|
||||||
}
|
}
|
||||||
@@ -8,7 +8,7 @@ sed -i -e '/profile.d/d' /lib/upgrade/keep.d/base-files \
|
|||||||
-e 's/git-.*-\(.*\)/git-\1/g' /usr/lib/lua/luci/version.lua 2>/dev/null
|
-e 's/git-.*-\(.*\)/git-\1/g' /usr/lib/lua/luci/version.lua 2>/dev/null
|
||||||
|
|
||||||
# 2. 版本与环境参数提取
|
# 2. 版本与环境参数提取
|
||||||
version=$(uci -q get base_config.@status[0].version)
|
version=$(uci -q get system.@status[0].version)
|
||||||
case "$version" in ''|*[!0-9]*) version=0 ;; esac
|
case "$version" in ''|*[!0-9]*) version=0 ;; esac
|
||||||
|
|
||||||
for ip in $(uci -q get network.lan.ipaddr); do
|
for ip in $(uci -q get network.lan.ipaddr); do
|
||||||
@@ -133,9 +133,9 @@ modprobe xt_FULLCONENAT >/dev/null 2>&1 || modprobe nft_fullcone >/dev/null 2>&1
|
|||||||
}
|
}
|
||||||
|
|
||||||
# 7. 更新版本状态、一次性提交所有 UCI 配置并安全退出
|
# 7. 更新版本状态、一次性提交所有 UCI 配置并安全退出
|
||||||
[ -f /etc/config/base_config ] && {
|
[ -f /etc/config/system ] && {
|
||||||
uci -q get base_config.@status[0] >/dev/null || uci -q add base_config status >/dev/null
|
uci -q get system.@status[0] >/dev/null || uci -q add system status >/dev/null
|
||||||
uci -q set base_config.@status[0].version="$version"
|
uci -q set system.@status[0].version="$version"
|
||||||
}
|
}
|
||||||
|
|
||||||
uci -q commit
|
uci -q commit
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ done
|
|||||||
# -------------------------------------------------------------
|
# -------------------------------------------------------------
|
||||||
# 既未强制重新配置,又无自定义参数,且已配置过时直接跳过
|
# 既未强制重新配置,又无自定义参数,且已配置过时直接跳过
|
||||||
if [ $FORCE -eq 0 ] && [ -z "$CUSTOM_SSID" ] && [ $HAS_PASSWD -eq 0 ]; then
|
if [ $FORCE -eq 0 ] && [ -z "$CUSTOM_SSID" ] && [ $HAS_PASSWD -eq 0 ]; then
|
||||||
if [ "$(uci -q get base_config.@status[0].wifi 2>/dev/null)" = "1" ]; then
|
if [ "$(uci -q get system.@status[0].wifi 2>/dev/null)" = "1" ]; then
|
||||||
log_info "WiFi 已配置完成,无需重复执行。"
|
log_info "WiFi 已配置完成,无需重复执行。"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
@@ -226,10 +226,9 @@ done
|
|||||||
# -------------------------------------------------------------
|
# -------------------------------------------------------------
|
||||||
uci commit wireless 2>/dev/null
|
uci commit wireless 2>/dev/null
|
||||||
|
|
||||||
if uci -q get base_config.@status[0] >/dev/null 2>&1; then
|
uci -q get system.@status[0] >/dev/null || uci -q add system status >/dev/null
|
||||||
uci -q set base_config.@status[0].wifi=1
|
uci -q set system.@status[0].wifi=1
|
||||||
uci commit base_config 2>/dev/null
|
uci commit system 2>/dev/null
|
||||||
fi
|
|
||||||
|
|
||||||
wifi reload 2>/dev/null || /sbin/wifi reload 2>/dev/null
|
wifi reload 2>/dev/null || /sbin/wifi reload 2>/dev/null
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user