~优化小闪存模式占用
~padavan设备增加开启启动时自动调整tmp分区至45m的功能,以适配新的内核压缩方式 ~修复小闪存模式本地面板未能正确加载的bug
This commit is contained in:
@@ -929,6 +929,7 @@ getcore(){ #下载内核文件
|
||||
else
|
||||
tar -zcf ${BINDIR}/CrashCore.tar.gz ${tar_para} -C ${TMPDIR} CrashCore
|
||||
fi
|
||||
rm -rf ${TMPDIR}/CrashCore.tar.gz #小闪存模式清理文件优化内存占用
|
||||
setconfig crashcore $crashcore
|
||||
setconfig core_v $core_v
|
||||
setconfig custcorelink $custcorelink
|
||||
|
||||
@@ -235,7 +235,9 @@ fi
|
||||
echo "$CRASHDIR/start.sh init #ShellCrash初始化脚本" >> $initdir
|
||||
chmod a+rx $initdir 2>/dev/null
|
||||
setconfig initdir $initdir
|
||||
}
|
||||
}
|
||||
#Padavan额外设置
|
||||
[ -f "/etc/storage/started_script.sh" ] && mount -t tmpfs -o remount,rw,size=45M tmpfs /tmp #增加/tmp空间以适配新的内核压缩方式
|
||||
#镜像化OpenWrt(snapshot)额外设置
|
||||
if [ "$systype" = "mi_snapshot" -o "$systype" = "ng_snapshot" ];then
|
||||
chmod 755 ${CRASHDIR}/misnap_init.sh
|
||||
|
||||
@@ -1615,7 +1615,7 @@ bfstart(){ #启动前
|
||||
fi
|
||||
fi
|
||||
#检查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}
|
||||
fi
|
||||
[ ! -s ${BINDIR}/ui/index.html ] && makehtml #如没有面板则创建跳转界面
|
||||
@@ -1862,6 +1862,7 @@ init)
|
||||
sleep 5 && i=$((i+1))
|
||||
done
|
||||
profile=/etc/profile
|
||||
mount -t tmpfs -o remount,rw,size=45M tmpfs /tmp #增加/tmp空间以适配新的内核压缩方式
|
||||
sed -i '' $profile #将软链接转化为一般文件
|
||||
elif [ -d "/jffs" ];then
|
||||
sleep 60
|
||||
|
||||
Reference in New Issue
Block a user