systemd: use systemd in the initramfs, if installed on the system
authorHarald Hoyer <harald@redhat.com>
Wed, 31 Jul 2013 11:30:49 +0000 (13:30 +0200)
committerHarald Hoyer <harald@redhat.com>
Wed, 31 Jul 2013 11:56:03 +0000 (13:56 +0200)
and systemd version is >= 198

modules.d/98systemd/module-setup.sh
modules.d/99base/module-setup.sh

index 761cda6..8775fd2 100755 (executable)
@@ -5,6 +5,8 @@
 check() {
     [[ $mount_needs ]] && return 1
     if [[ -x $systemdutildir/systemd ]]; then
+        SYSTEMD_VERSION=$($systemdutildir/systemd --version | { read a b a; echo $b; })
+        (( $SYSTEMD_VERSION >= 198 )) && return 0
        return 255
     fi
 
index e7466df..c9ee838 100755 (executable)
@@ -8,7 +8,6 @@ check() {
 
 depends() {
     echo udev-rules
-    systemctl --system --no-pager &>/dev/null && echo systemd
     return 0
 }