From 585b3b37c023a1c661452607b43d5a6be9035c90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= Date: Sun, 7 Oct 2012 15:29:02 +0200 Subject: [PATCH] 90crypt: call systemd commands only if systemd binaries are there --- modules.d/90crypt/crypt-run-generator.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules.d/90crypt/crypt-run-generator.sh b/modules.d/90crypt/crypt-run-generator.sh index 3264b299..bacdbbe0 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