~修复dns局域网过滤失效的bug

~修复初始化脚本报错的bug
~尝试修复部分华硕设备开机启动失效的问题
~尝试修复部分小米设备开机启动失效的问题
This commit is contained in:
juewuy
2024-04-05 18:22:33 +08:00
parent 6eff925b1d
commit f5618ef3d8
4 changed files with 16 additions and 13 deletions

View File

@@ -136,6 +136,9 @@ setconfig(){
systype=asusrouter #华硕固件
[ -f "/jffs/.asusrouter" ] && initdir='/jffs/.asusrouter'
[ -d "/jffs/scripts" ] && initdir='/jffs/scripts/nat-start'
#华硕启用jffs
nvram set jffs2_scripts="1"
nvram commit
}
[ -f "/data/etc/crontabs/root" ] && systype=mi_snapshot #小米设备
[ -w "/var/mnt/cfg/firewall" ] && systype=ng_snapshot #NETGEAR设备
@@ -234,18 +237,18 @@ if [ -n "$profile" ];then
echo "export CRASHDIR=\"$CRASHDIR\"" >> ~/.zshrc
source ~/.zshrc >/dev/null 2>&1
}
#在允许的情况下创建/usr/bin/crash文件
[ -w /usr/bin ] && {
cat > /usr/bin/crash <<EOF
#/bin/$shtype
$CRASHDIR/menu.sh \$1 \$2 \$3 \$4 \$5
EOF
chmod +x /usr/bin/crash
}
else
echo -e "\033[33m无法写入环境变量请检查安装权限\033[0m"
exit 1
fi
#在允许的情况下创建/usr/bin/crash文件
touch /usr/bin/crash 2>/dev/null && {
cat > /usr/bin/crash <<EOF
#/bin/$shtype
$CRASHDIR/menu.sh \$1 \$2 \$3 \$4 \$5
EOF
chmod +x /usr/bin/crash
}
#梅林/Padavan额外设置
[ -n "$initdir" ] && {
sed -i '/ShellCrash初始化/'d $initdir