mount-root: also filter "defaults" from mount options
parent
d793fc2e8b
commit
0ec519f8a4
|
@ -13,6 +13,7 @@ filter_rootopts() {
|
||||||
while [ $# -gt 0 ]; do
|
while [ $# -gt 0 ]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
rw|ro);;
|
rw|ro);;
|
||||||
|
defaults);;
|
||||||
*)
|
*)
|
||||||
v="$v,${1}";;
|
v="$v,${1}";;
|
||||||
esac
|
esac
|
||||||
|
@ -48,7 +49,7 @@ if [ -n "$root" -a -z "${root%%block:*}" ]; then
|
||||||
|
|
||||||
rootopts=$(filter_rootopts $rootopts)
|
rootopts=$(filter_rootopts $rootopts)
|
||||||
|
|
||||||
if [ -n "$rootopts" -a "$rootopts" != "defaults" ]; then
|
if [ -n "$rootopts" ]; then
|
||||||
umount $NEWROOT
|
umount $NEWROOT
|
||||||
info "Remounting ${root#block:} with -o $rootopts,$rflags"
|
info "Remounting ${root#block:} with -o $rootopts,$rflags"
|
||||||
mount -t "$rootfs" -o "$rflags","$rootopts" \
|
mount -t "$rootfs" -o "$rflags","$rootopts" \
|
||||||
|
|
Loading…
Reference in New Issue