]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
base/dracut-lib.sh:dev_unit_name() guard against $dev beginning with "-" 109/head
authorAlexander Tsoy <alexander@tsoy.me>
Tue, 5 Jan 2016 19:11:57 +0000 (22:11 +0300)
committerAlexander Tsoy <alexander@tsoy.me>
Tue, 5 Jan 2016 19:59:52 +0000 (22:59 +0300)
crypt/parse-crypt.sh generate initqueue job which always call
dev_unit_name() with an argument beginning with "-". This results
in the following error:

dracut-initqueue[307]: + systemd-escape -p -cfb4aa43-2f02-4c6b-a313-60ea99288087
dracut-initqueue[307]: systemd-escape: invalid option -- 'c'

modules.d/99base/dracut-lib.sh

index ad03394f045f7520c074bd150125c565b363e3c2..0a0b1b93bbdb60e192d5003b118e7221d0a8d525 100755 (executable)
@@ -874,7 +874,7 @@ dev_unit_name()
     local dev="$1"
 
     if command -v systemd-escape >/dev/null; then
-        systemd-escape -p  "$dev"
+        systemd-escape -p -- "$dev"
         return
     fi