mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 03:33:25 +02:00
flash-image: improve mount/dismount at partition resize.
fix missing parameters at mount. remount / ro before reboot to leave a clean rootfs.
This commit is contained in:
@@ -17,11 +17,11 @@
|
|||||||
|
|
||||||
case "${1}" in
|
case "${1}" in
|
||||||
start)
|
start)
|
||||||
|
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 ..."
|
boot_mesg "Autoresize /var partition to use the whole drive ..."
|
||||||
|
|
||||||
# Ensure that / is writeable
|
|
||||||
mount
|
|
||||||
|
|
||||||
# Detect device
|
# Detect device
|
||||||
ROOT=`mount | grep -m1 " / " | cut -d" " -f1`;
|
ROOT=`mount | grep -m1 " / " | cut -d" " -f1`;
|
||||||
DRV=${ROOT::`expr length $ROOT`-1}
|
DRV=${ROOT::`expr length $ROOT`-1}
|
||||||
@@ -34,6 +34,7 @@ case "${1}" in
|
|||||||
|
|
||||||
# Erase symlink, it should run only once
|
# Erase symlink, it should run only once
|
||||||
rm -f /etc/rc.d/rcsysinit.d/S26fsresize
|
rm -f /etc/rc.d/rcsysinit.d/S26fsresize
|
||||||
|
sync
|
||||||
|
|
||||||
exit 0;
|
exit 0;
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -18,8 +18,9 @@
|
|||||||
case "${1}" in
|
case "${1}" in
|
||||||
start)
|
start)
|
||||||
|
|
||||||
# Ensure that / is writeable
|
boot_mesg "Mounting root file system in read/write mode ..."
|
||||||
mount -o remount,rw /
|
mount -o remount,rw / > /dev/null
|
||||||
|
evaluate_retval
|
||||||
|
|
||||||
# Detect device
|
# Detect device
|
||||||
ROOT=`mount | grep -m1 " / " | cut -d" " -f1`;
|
ROOT=`mount | grep -m1 " / " | cut -d" " -f1`;
|
||||||
@@ -32,6 +33,8 @@ case "${1}" in
|
|||||||
rm -f /etc/rc.d/rcsysinit.d/S25partresize
|
rm -f /etc/rc.d/rcsysinit.d/S25partresize
|
||||||
|
|
||||||
boot_mesg "Rebooting ..."
|
boot_mesg "Rebooting ..."
|
||||||
|
sync
|
||||||
|
mount -o remount,ro / > /dev/null
|
||||||
reboot -f
|
reboot -f
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|||||||
Reference in New Issue
Block a user