part/fsresize: fix on systems without initrd.

/proc/mounts has no correct entry for / on such systems.
Use mount instead.
This commit is contained in:
Arne Fitzenreiter
2014-11-05 14:27:59 +01:00
parent 8f89ad6d42
commit c0504c5cc5
2 changed files with 10 additions and 4 deletions

View File

@@ -21,7 +21,7 @@ case "${1}" in
boot_mesg "Re-sizing root partition..."
# Find root device
while read -r dev mountpoint fs options; do
mount | while read -r dev tmp1 mountpoint tmp2; do
# Skip generic entries
[ "${dev}" = "rootfs" ] && continue
@@ -33,7 +33,7 @@ case "${1}" in
rm -f /.resizefs
break
fi
done < /proc/mounts
done
fi
;;

View File

@@ -22,8 +22,14 @@ case "${1}" in
mount -o remount,rw / > /dev/null
evaluate_retval
boot_mesg "Create /etc/mtab..."
> /etc/mtab
mount -f / || failed=1
(exit ${failed})
evaluate_retval
# Detect device
while read -r dev mountpoint fs options; do
mount | while read -r dev tmp1 mountpoint tmp2; do
[ "${dev}" = "rootfs" ] && continue
if [ "${mountpoint}" = "/" ]; then
@@ -57,7 +63,7 @@ case "${1}" in
sleep 15
reboot -f
fi
done < /proc/mounts
done
fi
;;
*)