From: Amadeusz Żołnowski Date: Sun, 7 Oct 2012 13:29:02 +0000 (+0200) Subject: 90crypt: call systemd commands only if systemd binaries are there X-Git-Tag: 024~33 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=585b3b37c023a1c661452607b43d5a6be9035c90;p=thirdparty%2Fdracut.git 90crypt: call systemd commands only if systemd binaries are there --- diff --git a/modules.d/90crypt/crypt-run-generator.sh b/modules.d/90crypt/crypt-run-generator.sh index 3264b2990..bacdbbe0e 100755 --- a/modules.d/90crypt/crypt-run-generator.sh +++ b/modules.d/90crypt/crypt-run-generator.sh @@ -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