mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-11-06 20:14:19 +08:00
update 2026-10-13 04:47:12
This commit is contained in:
1 parent
681afee1a6
commit
8c4f64e256
181 files changed
+269
-41528
No files matched your search
@@ -8,8 +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
|
||||
|
||||
# 2. 版本与环境参数提取
|
||||
version=$(uci -q get base_config.@status[0].version)
|
||||
case "$version" in ''|*[!0-9]*) version=0 ;; esac
|
||||
version=$(uci -q get system.@status[0].version || uci -q get base_config.@status[0].version || echo '0')
|
||||
|
||||
for ip in $(uci -q get network.lan.ipaddr); do
|
||||
case "$ip" in *.*) lan_ip="${ip%%/*}"; break ;; esac
|
||||
@@ -74,7 +73,7 @@ if [ "$version" -lt 1 ]; then
|
||||
EOF
|
||||
|
||||
(echo root; echo root) | passwd root >/dev/null 2>&1
|
||||
[ -f /usr/share/rpcd/acl.d/luci-theme-vantage.json ] && uci -q set luci.main.mediaurlbase='/luci-static/vantage'
|
||||
[ -d /usr/share/ucode/luci/template/themes/vantage ] && uci -q set luci.main.mediaurlbase='/luci-static/vantage'
|
||||
grep -q 'log-facility' /etc/dnsmasq.conf 2>/dev/null || echo "log-facility=/dev/null" >> /etc/dnsmasq.conf
|
||||
|
||||
mkdir -p /etc/sysctl.d
|
||||
@@ -133,9 +132,9 @@ modprobe xt_FULLCONENAT >/dev/null 2>&1 || modprobe nft_fullcone >/dev/null 2>&1
|
||||
}
|
||||
|
||||
# 7. 更新版本状态、一次性提交所有 UCI 配置并安全退出
|
||||
[ -f /etc/config/base_config ] && {
|
||||
uci -q get base_config.@status[0] >/dev/null || uci -q add base_config status >/dev/null
|
||||
uci -q set base_config.@status[0].version="$version"
|
||||
[ -f /etc/config/system ] && {
|
||||
uci -q get system.@status[0] >/dev/null || uci -q add system status >/dev/null
|
||||
uci -q set system.@status[0].version="$version"
|
||||
}
|
||||
|
||||
uci -q commit
|
||||
|
||||
Reference in new issue
Block a user