]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
90crypt: call systemd commands only if systemd binaries are there
authorAmadeusz Żołnowski <aidecoe@aidecoe.name>
Sun, 7 Oct 2012 13:29:02 +0000 (15:29 +0200)
committerHarald Hoyer <harald@redhat.com>
Mon, 8 Oct 2012 07:28:43 +0000 (03:28 -0400)
modules.d/90crypt/crypt-run-generator.sh

index 3264b29909dcdbac9d8a59ae5df6ac8636827cf2..bacdbbe0edd4dca040fa61b45953b77755f8e972 100755 (executable)
@@ -23,6 +23,9 @@ if strstr "$(cryptsetup --help)" "allow-discards"; then
 fi
 
 echo "$luks $dev none $allowdiscards" >> /etc/crypttab
-systemctl daemon-reload
-systemctl start cryptsetup.target
+
+if command -v systemctl >/dev/null; then
+    systemctl daemon-reload
+    systemctl start cryptsetup.target
+fi
 exit 0