~优化小闪存模式占用

~padavan设备增加开启启动时自动调整tmp分区至45m的功能,以适配新的内核压缩方式
~修复小闪存模式本地面板未能正确加载的bug
This commit is contained in:
juewuy
2024-02-07 11:13:11 +08:00
parent 7935e4c1be
commit f4ebf101f5
3 changed files with 6 additions and 2 deletions

View File

@@ -929,6 +929,7 @@ getcore(){ #下载内核文件
else else
tar -zcf ${BINDIR}/CrashCore.tar.gz ${tar_para} -C ${TMPDIR} CrashCore tar -zcf ${BINDIR}/CrashCore.tar.gz ${tar_para} -C ${TMPDIR} CrashCore
fi fi
rm -rf ${TMPDIR}/CrashCore.tar.gz #小闪存模式清理文件优化内存占用
setconfig crashcore $crashcore setconfig crashcore $crashcore
setconfig core_v $core_v setconfig core_v $core_v
setconfig custcorelink $custcorelink setconfig custcorelink $custcorelink

View File

@@ -235,7 +235,9 @@ fi
echo "$CRASHDIR/start.sh init #ShellCrash初始化脚本" >> $initdir echo "$CRASHDIR/start.sh init #ShellCrash初始化脚本" >> $initdir
chmod a+rx $initdir 2>/dev/null chmod a+rx $initdir 2>/dev/null
setconfig initdir $initdir setconfig initdir $initdir
} }
#Padavan额外设置
[ -f "/etc/storage/started_script.sh" ] && mount -t tmpfs -o remount,rw,size=45M tmpfs /tmp #增加/tmp空间以适配新的内核压缩方式
#镜像化OpenWrt(snapshot)额外设置 #镜像化OpenWrt(snapshot)额外设置
if [ "$systype" = "mi_snapshot" -o "$systype" = "ng_snapshot" ];then if [ "$systype" = "mi_snapshot" -o "$systype" = "ng_snapshot" ];then
chmod 755 ${CRASHDIR}/misnap_init.sh chmod 755 ${CRASHDIR}/misnap_init.sh

View File

@@ -1615,7 +1615,7 @@ bfstart(){ #启动前
fi fi
fi fi
#检查dashboard文件 #检查dashboard文件
if [ -f ${CRASHDIR}/ui/index.html -a ! -f ${BINDIR}/ui/index.html ];then if [ -f ${CRASHDIR}/ui/CNAME -a ! -f ${BINDIR}/ui/CNAME ];then
cp -rf ${CRASHDIR}/ui ${BINDIR} cp -rf ${CRASHDIR}/ui ${BINDIR}
fi fi
[ ! -s ${BINDIR}/ui/index.html ] && makehtml #如没有面板则创建跳转界面 [ ! -s ${BINDIR}/ui/index.html ] && makehtml #如没有面板则创建跳转界面
@@ -1862,6 +1862,7 @@ init)
sleep 5 && i=$((i+1)) sleep 5 && i=$((i+1))
done done
profile=/etc/profile profile=/etc/profile
mount -t tmpfs -o remount,rw,size=45M tmpfs /tmp #增加/tmp空间以适配新的内核压缩方式
sed -i '' $profile #将软链接转化为一般文件 sed -i '' $profile #将软链接转化为一般文件
elif [ -d "/jffs" ];then elif [ -d "/jffs" ];then
sleep 60 sleep 60