检查自动恢复ext4 rw (#23)

This commit is contained in:
littoy 2023-01-20 19:53:32 +08:00 committed by GitHub
parent 015fd03291
commit f7124f06dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,6 +20,10 @@ uci_apply_defaults() {
boot() {
[ -f /proc/mounts ] || /sbin/mount_root
[ -f /proc/jffs2_bbc ] && echo "S" > /proc/jffs2_bbc
have_ro_ext4=$(/bin/cat /proc/mounts |/bin/grep ' / ext4'|/bin/grep 'ro'|/usr/bin/wc -l)
if [ "$have_ro_ext4" != "0" ]; then
/usr/bin/mount -o remount,rw /
fi
mkdir -p /var/lock
chmod 1777 /var/lock