From 31737a05e1692d1c43e34d81710b7de7ae5b4146 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 8 Mar 2013 07:06:31 +0100 Subject: [PATCH] systemd: add version check in install() --- modules.d/98systemd/module-setup.sh | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- 2.47.3