]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
flash-image: improve mount/dismount at partition resize.
authorArne Fitzenreiter <arne_f@ipfire.org>
Fri, 20 Jan 2012 20:06:45 +0000 (21:06 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Fri, 20 Jan 2012 20:06:45 +0000 (21:06 +0100)
fix missing parameters at mount.
remount / ro before reboot to leave a clean rootfs.

src/initscripts/init.d/fsresize
src/initscripts/init.d/partresize

index b1af720b58d1888aa5046edb7ee165bac9e0a525..0afe77900c13b89f5836e0af83f6eb175c9ba18f 100644 (file)
 
 case "${1}" in
        start)
-               boot_mesg "Autoresize /var partition to use the whole drive ..."
-
-               # Ensure that / is writeable
-               mount
+               boot_mesg "Mounting root file system in read/write mode ..."
+               mount -o remount,rw / > /dev/null
+               evaluate_retval
 
+               boot_mesg "Autoresize /var partition to use the whole drive ..."
                # Detect device
                ROOT=`mount | grep -m1 " / " | cut -d" " -f1`;
                DRV=${ROOT::`expr length $ROOT`-1}
@@ -34,6 +34,7 @@ case "${1}" in
 
                # Erase symlink, it should run only once
                rm -f /etc/rc.d/rcsysinit.d/S26fsresize
+               sync
 
                exit 0;
                ;;
index 9c9a60998d4636bb17541fe2bf00f85b528a4184..8eddc46c373a456c1661700bd32fad348ba55b26 100644 (file)
@@ -18,8 +18,9 @@
 case "${1}" in
        start)
 
-               # Ensure that / is writeable
-               mount -o remount,rw /
+               boot_mesg "Mounting root file system in read/write mode ..."
+               mount -o remount,rw / > /dev/null
+               evaluate_retval
 
                # Detect device
                ROOT=`mount | grep -m1 " / " | cut -d" " -f1`;
@@ -32,6 +33,8 @@ case "${1}" in
                rm -f /etc/rc.d/rcsysinit.d/S25partresize
 
                boot_mesg "Rebooting ..."
+               sync
+               mount -o remount,ro / > /dev/null
                reboot -f
 
                ;;