]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut-systemd/dracut-cmdline-ask: fix dracut --kernel-cmdline=rd.cmdline=ask 115/head
authorEvgeny Vereshchagin <evvers@ya.ru>
Mon, 15 Feb 2016 08:29:40 +0000 (08:29 +0000)
committerEvgeny Vereshchagin <evvers@ya.ru>
Mon, 15 Feb 2016 08:47:47 +0000 (08:47 +0000)
How to reproduce:

host# dracut --kernel-cmdline='rd.cmdline=ask' initramfs.img
host# qemu-system-x86_64 -initrd initramfs.img ... -append root=/dev/sda1 ...
...

qemu-host# journalctl -b | grep dracut-cmdline-ask
...
Feb 15 08:45:36 localhost systemd[1]: dracut-cmdline-ask.service: Installed new job dracut-cmdline-ask.service/start as 42
Feb 15 08:45:36 localhost systemd[1]: dracut-cmdline-ask.service: ConditionKernelCommandLine=rd.cmdline=ask failed.
Feb 15 08:45:36 localhost systemd[1]: dracut-cmdline-ask.service: Starting requested but condition failed. Not starting unit.
Feb 15 08:45:36 localhost systemd[1]: dracut-cmdline-ask.service: Job dracut-cmdline-ask.service/start finished, result=done
...

Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
modules.d/98dracut-systemd/dracut-cmdline-ask.service
modules.d/98dracut-systemd/dracut-cmdline-ask.sh

index 9a34b355a9c92342b21fc707d00b8eb06c04bec2..8bc7d809237681de1df90e4c310166269d7cf386 100644 (file)
@@ -14,7 +14,8 @@ Before=dracut-cmdline.service
 After=systemd-journald.socket
 Wants=systemd-journald.socket
 ConditionPathExists=/usr/lib/initrd-release
-ConditionKernelCommandLine=rd.cmdline=ask
+ConditionKernelCommandLine=|rd.cmdline=ask
+ConditionPathExistsGlob=|/etc/cmdline.d/*.conf
 
 [Service]
 Environment=DRACUT_SYSTEMD=1
index ab8933ada89cc84dfa18670f192b12e2f0c5a99a..f410f464eac47007f2d1d26a14843d9d44983bbf 100755 (executable)
@@ -1,5 +1,9 @@
 #!/bin/bash
 
+type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
+
+getarg "rd.cmdline=ask" || exit 0
+
 sleep 0.5
 echo
 sleep 0.5