]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
systemd: add version check in install()
authorHarald Hoyer <harald@redhat.com>
Fri, 8 Mar 2013 06:06:31 +0000 (07:06 +0100)
committerHarald Hoyer <harald@redhat.com>
Fri, 8 Mar 2013 06:07:01 +0000 (07:07 +0100)
modules.d/98systemd/module-setup.sh

index ccd4319fdf4b16132cd3f7cd171174861bd6ec26..3ce1705e1bbfecabc70d5a1e0c503c1908ba7fce 100755 (executable)
@@ -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