Blame 0013-base-dracut-lib.sh-dev_unit_name-guard-against-dev-b.patch

Harald Hoyer 7ba020
From c41df7e1db1adc51399ab2c22f251b15eb2065b1 Mon Sep 17 00:00:00 2001
Harald Hoyer 7ba020
From: Alexander Tsoy <alexander@tsoy.me>
Harald Hoyer 7ba020
Date: Tue, 5 Jan 2016 22:11:57 +0300
Harald Hoyer 7ba020
Subject: [PATCH] base/dracut-lib.sh:dev_unit_name() guard against $dev
Harald Hoyer 7ba020
 beginning with "-"
Harald Hoyer 7ba020
Harald Hoyer 7ba020
crypt/parse-crypt.sh generate initqueue job which always call
Harald Hoyer 7ba020
dev_unit_name() with an argument beginning with "-". This results
Harald Hoyer 7ba020
in the following error:
Harald Hoyer 7ba020
Harald Hoyer 7ba020
dracut-initqueue[307]: + systemd-escape -p -cfb4aa43-2f02-4c6b-a313-60ea99288087
Harald Hoyer 7ba020
dracut-initqueue[307]: systemd-escape: invalid option -- 'c'
Harald Hoyer 7ba020
---
Harald Hoyer 7ba020
 modules.d/99base/dracut-lib.sh | 2 +-
Harald Hoyer 7ba020
 1 file changed, 1 insertion(+), 1 deletion(-)
Harald Hoyer 7ba020
Harald Hoyer 7ba020
diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh
Harald Hoyer 7ba020
index ad03394..0a0b1b9 100755
Harald Hoyer 7ba020
--- a/modules.d/99base/dracut-lib.sh
Harald Hoyer 7ba020
+++ b/modules.d/99base/dracut-lib.sh
Harald Hoyer 7ba020
@@ -874,7 +874,7 @@ dev_unit_name()
Harald Hoyer 7ba020
     local dev="$1"
Harald Hoyer 7ba020
 
Harald Hoyer 7ba020
     if command -v systemd-escape >/dev/null; then
Harald Hoyer 7ba020
-        systemd-escape -p  "$dev"
Harald Hoyer 7ba020
+        systemd-escape -p -- "$dev"
Harald Hoyer 7ba020
         return
Harald Hoyer 7ba020
     fi
Harald Hoyer 7ba020