rootfs-block: strip "ro|rw" options from fstab options
https://bugzilla.redhat.com/show_bug.cgi?id=560424master
parent
54aaad9dad
commit
d43036ffeb
|
|
@ -23,9 +23,29 @@ if [ -n "$root" -a -z "${root%%block:*}" ]; then
|
||||||
fi
|
fi
|
||||||
done < "$NEWROOT/etc/fstab"
|
done < "$NEWROOT/etc/fstab"
|
||||||
|
|
||||||
|
|
||||||
|
# strip ro and rw options
|
||||||
|
{
|
||||||
|
local OLDIFS=$IFS
|
||||||
|
IFS=,
|
||||||
|
set -- $rootopts
|
||||||
|
IFS=$OLDIFS
|
||||||
|
local v
|
||||||
|
while [ $# -gt 0 ]; do
|
||||||
|
case $1 in
|
||||||
|
rw|ro);;
|
||||||
|
*)
|
||||||
|
v="$v,${1}";;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
rootopts=${v#,}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if [ "$rootopts" != "defaults" ]; then
|
if [ "$rootopts" != "defaults" ]; then
|
||||||
umount $NEWROOT
|
umount $NEWROOT
|
||||||
info "Remounting ${root#block:} with -o $rflags,$rootopts"
|
info "Remounting ${root#block:} with -o $rootopts,$rflags"
|
||||||
mount -t "$rootfs" -o "$rflags","$rootopts" \
|
mount -t "$rootfs" -o "$rflags","$rootopts" \
|
||||||
"${root#block:}" "$NEWROOT" 2>&1 | vinfo
|
"${root#block:}" "$NEWROOT" 2>&1 | vinfo
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue