fix(usrmount): do not empty _dev variable
Currently $_dev is always overridden with the value returned by
label_uuid_to_dev(). This results in an empty value if $_dev is a
device path. Fix this by calling label_uuid_to_dev() conditionally.
Bug: https://bugs.gentoo.org/807971
Fixes: d3532978de
master
parent
7374943ae3
commit
4afdcba212
|
@ -55,7 +55,12 @@ mount_usr() {
|
||||||
while read -r _dev _mp _fs _opts _freq _passno || [ -n "$_dev" ]; do
|
while read -r _dev _mp _fs _opts _freq _passno || [ -n "$_dev" ]; do
|
||||||
[ "${_dev%%#*}" != "$_dev" ] && continue
|
[ "${_dev%%#*}" != "$_dev" ] && continue
|
||||||
if [ "$_mp" = "/usr" ]; then
|
if [ "$_mp" = "/usr" ]; then
|
||||||
|
case "$_dev" in
|
||||||
|
LABEL=* | UUID=* | PARTUUID=* | PARTLABEL=*)
|
||||||
_dev="$(label_uuid_to_dev "$_dev")"
|
_dev="$(label_uuid_to_dev "$_dev")"
|
||||||
|
;;
|
||||||
|
*) ;;
|
||||||
|
esac
|
||||||
|
|
||||||
if strstr "$_opts" "subvol=" \
|
if strstr "$_opts" "subvol=" \
|
||||||
&& [ "${root#block:}" -ef "$_dev" ] \
|
&& [ "${root#block:}" -ef "$_dev" ] \
|
||||||
|
|
Loading…
Reference in New Issue