]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
set DRACUT_SYSTEMD for systemd mode in the initramfs
authorHarald Hoyer <harald@redhat.com>
Mon, 30 Jul 2012 12:35:26 +0000 (14:35 +0200)
committerHarald Hoyer <harald@redhat.com>
Mon, 30 Jul 2012 15:08:51 +0000 (17:08 +0200)
modules.d/10i18n/console_init.sh
modules.d/10i18n/parse-i18n.sh
modules.d/50plymouth/plymouth-newroot.sh
modules.d/50plymouth/plymouth-pretrigger.sh
modules.d/90crypt/parse-crypt.sh
modules.d/98systemd/dracut-cmdline.sh
modules.d/98systemd/dracut-initqueue.sh
modules.d/98systemd/dracut-pre-pivot.sh
modules.d/98systemd/dracut-pre-trigger.sh
modules.d/98systemd/dracut-pre-udev.sh
modules.d/99base/dracut-lib.sh

index 24eaad8e11dec152f03e5b1e8f189f842bd21a34..8817f9572a7b1e9e9f63abe0ba5dec4e672a5c9f 100755 (executable)
@@ -2,7 +2,7 @@
 # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
 # ex: ts=8 sw=4 sts=4 et filetype=sh
 
-[ -x /lib/systemd/systemd ] && exit 0
+[ -n "$DRACUT_SYSTEMD" ] && exit 0
 
 if [ -x /lib/systemd/systemd-vconsole-setup ]; then
     /lib/systemd/systemd-vconsole-setup "$@"
index b35329676d2ad59d66afb85aed85bc6f7cc93ade..90152cf0399ddd5082a1ff5417719791e0b14b45 100755 (executable)
@@ -35,7 +35,7 @@ if [ -f /etc/locale.conf ]; then
     export LC_ALL
 fi
 
-if [ -x /lib/systemd/systemd ]; then
+if [ -n "$DRACUT_SYSTEMD" ]; then
     rm -f /{etc,lib}/udev/rules.d/10-console.rules
     rm -f /lib/udev/console_init
 fi
index c5f1e56d2e4711fcc598968fd917bedc3cb54d53..58ac11ffcf7ec38111319117460f13e328a163c8 100755 (executable)
@@ -2,5 +2,5 @@
 # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
 # ex: ts=8 sw=4 sts=4 et filetype=sh
 
-[ -x /bin/plymouth -a ! -x /lib/systemd/systemd ] || exit 0
+[ -x /bin/plymouth -a -z "$DRACUT_SYSTEMD" ] || exit 0
 /bin/plymouth --newroot=$NEWROOT
index b282069ea71a0340849473f2583e00deffd5ec50..e5365649c272064528b946f1929cf677866ee63b 100755 (executable)
@@ -2,7 +2,7 @@
 # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
 # ex: ts=8 sw=4 sts=4 et filetype=sh
 
-[ -x /bin/plymouthd -a ! -x /lib/systemd/systemd ] || exit 0
+[ -x /bin/plymouthd -a ! -n "$DRACUT_SYSTEMD" ] || exit 0
 
 if getargbool 1 plymouth.enable && getargbool 1 rd.plymouth -d -n rd_NO_PLYMOUTH; then
         # first trigger graphics subsystem
index a2b157f1024606c84eee365ea9fa7e29da087c38..e20e6e09ee11a27fb6cdd5ea09e0f04ce851bf6a 100755 (executable)
@@ -1,6 +1,9 @@
 #!/bin/sh
 # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
 # ex: ts=8 sw=4 sts=4 et filetype=sh
+
+[ -n "$DRACUT_SYSTEMD" ] && exit 0
+
 if ! getargbool 1 rd.luks -d -n rd_NO_LUKS; then
     info "rd.luks=0: removing cryptoluks activation"
     rm -f /etc/udev/rules.d/70-luks.rules
index 927b99a681cbd96f049d442fa10407214f7079f2..a366381a4efdcc6a70caca5e11c97e05f3db4576 100755 (executable)
@@ -2,7 +2,8 @@
 # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
 # ex: ts=8 sw=4 sts=4 et filetype=sh
 
-NEWROOT="/sysroot"
+export DRACUT_SYSTEMD=1
+export NEWROOT="/sysroot"
 [ -d $NEWROOT ] || mkdir -p -m 0755 $NEWROOT
 [ -d /run/initramfs ] || mkdir -p -m 0755 /run/initramfs
 [ -d /run/lock ] || mkdir -p -m 0755 /run/lock
index 112d2a86e5414671f16d2c951b826c80e6ccaa3b..1ee6be15a8f75fa355d6ffa5c6feba16d9adf319 100755 (executable)
@@ -2,6 +2,7 @@
 # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
 # ex: ts=8 sw=4 sts=4 et filetype=sh
 
+export DRACUT_SYSTEMD=1
 if [ -f /dracut-state.sh ]; then
     . /dracut-state.sh 2>/dev/null
 fi
index 3fd7957fca4ed9bfed1e8fe5d385deb51e90c2f6..1ffa6aaab6a4979308841025e9e35ce2bb1e4409 100755 (executable)
@@ -2,6 +2,7 @@
 # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
 # ex: ts=8 sw=4 sts=4 et filetype=sh
 
+export DRACUT_SYSTEMD=1
 if [ -f /dracut-state.sh ]; then
     . /dracut-state.sh 2>/dev/null
 fi
index 9850124781b291b963792a40a05309a6b1bd9b0f..20a3f64709e2ef4d0f041f2557c57ef1040a5fc3 100755 (executable)
@@ -2,6 +2,7 @@
 # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
 # ex: ts=8 sw=4 sts=4 et filetype=sh
 
+export DRACUT_SYSTEMD=1
 if [ -f /dracut-state.sh ]; then
     . /dracut-state.sh 2>/dev/null
 fi
index 2566ab9be7d708583fc20d02a9fa0b85aa2f7a63..9a4dc61e92f1f67115c7a3284b0dfb64ccee015f 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
 # ex: ts=8 sw=4 sts=4 et filetype=sh
-
+export DRACUT_SYSTEMD=1
 if [ -f /dracut-state.sh ]; then
     . /dracut-state.sh 2>/dev/null
 fi
index 813cead1ac7e88f4060872f1c5fedb697adb744d..b4ef59aae12d0e37fa6b88b4b2a2aa90cb9f15b3 100755 (executable)
@@ -358,7 +358,7 @@ check_quiet() {
     fi
 }
 
-if [ ! -x /lib/systemd/systemd ]; then
+if [ -z "$DRACUT_SYSTEMD" ]; then
 
     warn() {
         check_quiet