From: Harald Hoyer Date: Mon, 20 Apr 2020 13:07:02 +0000 (+0200) Subject: systemd: skip dependency add for non-existent units X-Git-Tag: 051~177 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a4a212649bd89f5a07ccf87a53b3103094748a3;p=thirdparty%2Fdracut.git systemd: skip dependency add for non-existent units Fixes: https://github.com/dracutdevs/dracut/issues/795 --- diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh index 5ebdfc301..17be74fd9 100755 --- a/modules.d/00systemd/module-setup.sh +++ b/modules.d/00systemd/module-setup.sh @@ -241,6 +241,7 @@ install() { systemd-ask-password-console.service \ systemd-ask-password-plymouth.service \ ; do + [[ -f $systemdsystemunitdir/$i ]] || continue systemctl -q --root "$initdir" add-wants "$i" systemd-vconsole-setup.service done