diff options
author | Alexander Tsoy <alexander@tsoy.me> | 2021-08-16 18:54:34 +0300 |
---|---|---|
committer | Jóhann B. Guðmundsson <johannbg@gmail.com> | 2021-08-17 07:48:15 +0000 |
commit | 4afdcba212793f136aea012b30dd7bdb5b641a5a (patch) | |
tree | e175bdaf807ed1a2a9eca39506938d16fbe24263 | |
parent | 7374943ae3d063f0142c969b132c4156030fda8b (diff) | |
download | dracut-4afdcba212793f136aea012b30dd7bdb5b641a5a.tar.gz |
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: d3532978de04c78f53664dad7b37705a49a7ee54
-rwxr-xr-x | modules.d/98usrmount/mount-usr.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/modules.d/98usrmount/mount-usr.sh b/modules.d/98usrmount/mount-usr.sh index 23ed06aa..c8e1893b 100755 --- a/modules.d/98usrmount/mount-usr.sh +++ b/modules.d/98usrmount/mount-usr.sh @@ -55,7 +55,12 @@ mount_usr() { while read -r _dev _mp _fs _opts _freq _passno || [ -n "$_dev" ]; do [ "${_dev%%#*}" != "$_dev" ] && continue if [ "$_mp" = "/usr" ]; then - _dev="$(label_uuid_to_dev "$_dev")" + case "$_dev" in + LABEL=* | UUID=* | PARTUUID=* | PARTLABEL=*) + _dev="$(label_uuid_to_dev "$_dev")" + ;; + *) ;; + esac if strstr "$_opts" "subvol=" \ && [ "${root#block:}" -ef "$_dev" ] \ |