mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-11 11:35:54 +02:00
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:
@@ -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
|
||||
;;
|
||||
|
||||
|
||||
@@ -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
|
||||
;;
|
||||
*)
|
||||
|
||||
Reference in New Issue
Block a user