]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
Simplify.
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 19 Oct 2006 09:55:11 +0000 (09:55 +0000)
committerElan Ruusamäe <glen@pld-linux.org>
Thu, 19 Oct 2006 09:55:11 +0000 (09:55 +0000)
svn-id: @7871

rc.d/rc.sysinit

index 013790976cc7928e29423cfcd4e38bf73b564494..6ecc9b7cd2d358a0cbe4ba86994054c44e2514b0 100755 (executable)
@@ -372,7 +372,7 @@ if ! is_yes "$VSERVER"; then
        # Remount the root filesystem read-write
        # There could be multiple entries for rootfs, so if any of them is 'ro' we
        # assume rootfs is readonly.
-       ro=$(awk '$2 == "/" { if (match($4, /(^ro$|^ro,|,ro,|,ro$)/)) readonly = 1} END { print readonly ? "ro" : "rw"} ' /proc/mounts)
+       ro=$(awk '$2 == "/" { $4 ~ /(^ro$|^ro,|,ro,|,ro$)/ readonly = 1} END { print readonly ? "ro" : "rw"} ' /proc/mounts)
        if [ "$ro" = "ro" ]; then
                run_cmd "Remounting root filesystem in rw mode" mount -n -o remount,rw /
        fi
This page took 0.031215 seconds and 4 git commands to generate.