Improve handling of missing /etc/fstab

cleanup-cruft
Sebastian Pipping 13 years ago
parent 3ca4d17874
commit adefd0fccc

@ -5,6 +5,10 @@
# Distributed under the GPL v2
# $Id$
16 Mar 2012; Sebastian Pipping <sping@gentoo.org> defaults/initrd.scripts,
defaults/linuxrc:
Improve handling of missing /etc/fstab
16 Mar 2012; Sebastian Pipping <sping@gentoo.org> defaults/initrd.scripts:
No longer use parameter "-r" (for regex intervals) that busybox awk does not
support

@ -1205,6 +1205,7 @@ get_mounts_list()
get_mount_fstype()
{
[ -e "${NEW_ROOT}"/etc/fstab ] || return 1
awk -v fs="$1" '
/^[[:blank:]]*#/ { next }
$2 == fs { print $3 }
@ -1213,6 +1214,7 @@ get_mount_fstype()
get_mount_options()
{
[ -e "${NEW_ROOT}"/etc/fstab ] || return 1
awk -v fs="$1" '
/^[[:blank:]]*#/ { next }
$2 == fs { print $4 }
@ -1221,6 +1223,7 @@ get_mount_options()
get_mount_device()
{
[ -e "${NEW_ROOT}"/etc/fstab ] || return 1
awk -v fs="$1" '
/^[[:blank:]]*#/ { next }
$2 == fs { print $1 }

@ -776,6 +776,7 @@ fi
for fs in $fslist; do
dev=$(get_mount_device $fs)
[ -z "${dev}" ] && continue
# Resolve it like util-linux mount does
[ -L ${dev} ] && dev=`readlink ${dev}`
# In this case, it's probably part of the filesystem

Loading…
Cancel
Save