From f7124f06dc28087f9bfba8065ec02c5be47d925b Mon Sep 17 00:00:00 2001 From: littoy <103546957+littoy@users.noreply.github.com> Date: Fri, 20 Jan 2023 19:53:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A3=80=E6=9F=A5=E8=87=AA=E5=8A=A8=E6=81=A2?= =?UTF-8?q?=E5=A4=8Dext4=20rw=20(#23)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package/base-files/files/etc/init.d/boot | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package/base-files/files/etc/init.d/boot b/package/base-files/files/etc/init.d/boot index 749d9e971..369690d1c 100755 --- a/package/base-files/files/etc/init.d/boot +++ b/package/base-files/files/etc/init.d/boot @@ -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