usrmount/mount-usr.sh: filter "subvol=" from root rflags
https://bugzilla.redhat.com/show_bug.cgi?id=890577master
parent
1db3d2615d
commit
e6fcec9173
|
@ -5,6 +5,21 @@
|
||||||
type info >/dev/null 2>&1 || . /lib/dracut-lib.sh
|
type info >/dev/null 2>&1 || . /lib/dracut-lib.sh
|
||||||
type fsck_single >/dev/null 2>&1 || . /lib/fs-lib.sh
|
type fsck_single >/dev/null 2>&1 || . /lib/fs-lib.sh
|
||||||
|
|
||||||
|
filtersubvol() {
|
||||||
|
local _oldifs
|
||||||
|
_oldifs="$IFS"
|
||||||
|
IFS=","
|
||||||
|
set $*
|
||||||
|
IFS="$_oldifs"
|
||||||
|
while [ $# -gt 0 ]; do
|
||||||
|
case $1 in
|
||||||
|
subvol\=*) :;;
|
||||||
|
*) echo -n "${1}," ;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
fsck_usr()
|
fsck_usr()
|
||||||
{
|
{
|
||||||
local _dev=$1
|
local _dev=$1
|
||||||
|
@ -56,6 +71,8 @@ mount_usr()
|
||||||
[ "${root#block:}" -ef $_dev ]
|
[ "${root#block:}" -ef $_dev ]
|
||||||
[ -n "$rflags" ]; then
|
[ -n "$rflags" ]; then
|
||||||
# for btrfs subvolumes we have to mount /usr with the same rflags
|
# for btrfs subvolumes we have to mount /usr with the same rflags
|
||||||
|
rflags=$(filtersubvol "$rflags")
|
||||||
|
rflags=${rflags%%,}
|
||||||
_opts="${_opts:+${_opts},}${rflags}"
|
_opts="${_opts:+${_opts},}${rflags}"
|
||||||
elif getargbool 0 ro; then
|
elif getargbool 0 ro; then
|
||||||
# if "ro" is specified, we want /usr to be mounted read-only
|
# if "ro" is specified, we want /usr to be mounted read-only
|
||||||
|
|
Loading…
Reference in New Issue