From: Harald Hoyer Date: Fri, 8 Mar 2013 06:06:31 +0000 (+0100) Subject: systemd: add version check in install() X-Git-Tag: 026~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=31737a05e1692d1c43e34d81710b7de7ae5b4146;p=thirdparty%2Fdracut.git systemd: add version check in install() --- diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh index ccd4319fd..3ce1705e1 100755 --- a/modules.d/98systemd/module-setup.sh +++ b/modules.d/98systemd/module-setup.sh @@ -16,6 +16,13 @@ depends() { } install() { + + SYSTEMD_VERSION=$(systemd --version | { read a b a; echo $b; }) + if (( $SYSTEMD_VERSION < 198 )); then + dfatal "systemd version $SYSTEMD_VERSION is too low. Need at least version 198." + exit 1 + fi + if strstr "$prefix" "/run/"; then dfatal "systemd does not work a prefix, which contains \"/run\"!!" exit 1