Skip to content

Commit 4afdcba

Browse files
puleglotjohannbg
authored andcommitted
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: d353297
1 parent 7374943 commit 4afdcba

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

modules.d/98usrmount/mount-usr.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,12 @@ mount_usr() {
5555
while read -r _dev _mp _fs _opts _freq _passno || [ -n "$_dev" ]; do
5656
[ "${_dev%%#*}" != "$_dev" ] && continue
5757
if [ "$_mp" = "/usr" ]; then
58-
_dev="$(label_uuid_to_dev "$_dev")"
58+
case "$_dev" in
59+
LABEL=* | UUID=* | PARTUUID=* | PARTLABEL=*)
60+
_dev="$(label_uuid_to_dev "$_dev")"
61+
;;
62+
*) ;;
63+
esac
5964

6065
if strstr "$_opts" "subvol=" \
6166
&& [ "${root#block:}" -ef "$_dev" ] \

0 commit comments

Comments
 (0)