|
Harald Hoyer |
811c04 |
From aefea76cf85a19781447880d2a82e4da3a25d068 Mon Sep 17 00:00:00 2001
|
|
Harald Hoyer |
811c04 |
From: Harald Hoyer <harald@redhat.com>
|
|
Harald Hoyer |
811c04 |
Date: Mon, 30 Jul 2012 14:35:26 +0200
|
|
Harald Hoyer |
811c04 |
Subject: [PATCH] set DRACUT_SYSTEMD for systemd mode in the initramfs
|
|
Harald Hoyer |
811c04 |
|
|
Harald Hoyer |
811c04 |
---
|
|
Harald Hoyer |
811c04 |
modules.d/10i18n/console_init.sh | 2 +-
|
|
Harald Hoyer |
811c04 |
modules.d/10i18n/parse-i18n.sh | 2 +-
|
|
Harald Hoyer |
811c04 |
modules.d/50plymouth/plymouth-newroot.sh | 2 +-
|
|
Harald Hoyer |
811c04 |
modules.d/50plymouth/plymouth-pretrigger.sh | 2 +-
|
|
Harald Hoyer |
811c04 |
modules.d/90crypt/parse-crypt.sh | 3 +++
|
|
Harald Hoyer |
811c04 |
modules.d/98systemd/dracut-cmdline.sh | 3 ++-
|
|
Harald Hoyer |
811c04 |
modules.d/98systemd/dracut-initqueue.sh | 1 +
|
|
Harald Hoyer |
811c04 |
modules.d/98systemd/dracut-pre-pivot.sh | 1 +
|
|
Harald Hoyer |
811c04 |
modules.d/98systemd/dracut-pre-trigger.sh | 1 +
|
|
Harald Hoyer |
811c04 |
modules.d/98systemd/dracut-pre-udev.sh | 2 +-
|
|
Harald Hoyer |
811c04 |
modules.d/99base/dracut-lib.sh | 2 +-
|
|
Harald Hoyer |
811c04 |
11 files changed, 14 insertions(+), 7 deletions(-)
|
|
Harald Hoyer |
811c04 |
|
|
Harald Hoyer |
811c04 |
diff --git a/modules.d/10i18n/console_init.sh b/modules.d/10i18n/console_init.sh
|
|
Harald Hoyer |
811c04 |
index 24eaad8..8817f95 100755
|
|
Harald Hoyer |
811c04 |
--- a/modules.d/10i18n/console_init.sh
|
|
Harald Hoyer |
811c04 |
+++ b/modules.d/10i18n/console_init.sh
|
|
Harald Hoyer |
811c04 |
@@ -2,7 +2,7 @@
|
|
Harald Hoyer |
811c04 |
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
Harald Hoyer |
811c04 |
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
Harald Hoyer |
811c04 |
|
|
Harald Hoyer |
811c04 |
-[ -x /lib/systemd/systemd ] && exit 0
|
|
Harald Hoyer |
811c04 |
+[ -n "$DRACUT_SYSTEMD" ] && exit 0
|
|
Harald Hoyer |
811c04 |
|
|
Harald Hoyer |
811c04 |
if [ -x /lib/systemd/systemd-vconsole-setup ]; then
|
|
Harald Hoyer |
811c04 |
/lib/systemd/systemd-vconsole-setup "$@"
|
|
Harald Hoyer |
811c04 |
diff --git a/modules.d/10i18n/parse-i18n.sh b/modules.d/10i18n/parse-i18n.sh
|
|
Harald Hoyer |
811c04 |
index b353296..90152cf 100755
|
|
Harald Hoyer |
811c04 |
--- a/modules.d/10i18n/parse-i18n.sh
|
|
Harald Hoyer |
811c04 |
+++ b/modules.d/10i18n/parse-i18n.sh
|
|
Harald Hoyer |
811c04 |
@@ -35,7 +35,7 @@ if [ -f /etc/locale.conf ]; then
|
|
Harald Hoyer |
811c04 |
export LC_ALL
|
|
Harald Hoyer |
811c04 |
fi
|
|
Harald Hoyer |
811c04 |
|
|
Harald Hoyer |
811c04 |
-if [ -x /lib/systemd/systemd ]; then
|
|
Harald Hoyer |
811c04 |
+if [ -n "$DRACUT_SYSTEMD" ]; then
|
|
Harald Hoyer |
811c04 |
rm -f /{etc,lib}/udev/rules.d/10-console.rules
|
|
Harald Hoyer |
811c04 |
rm -f /lib/udev/console_init
|
|
Harald Hoyer |
811c04 |
fi
|
|
Harald Hoyer |
811c04 |
diff --git a/modules.d/50plymouth/plymouth-newroot.sh b/modules.d/50plymouth/plymouth-newroot.sh
|
|
Harald Hoyer |
811c04 |
index c5f1e56..58ac11f 100755
|
|
Harald Hoyer |
811c04 |
--- a/modules.d/50plymouth/plymouth-newroot.sh
|
|
Harald Hoyer |
811c04 |
+++ b/modules.d/50plymouth/plymouth-newroot.sh
|
|
Harald Hoyer |
811c04 |
@@ -2,5 +2,5 @@
|
|
Harald Hoyer |
811c04 |
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
Harald Hoyer |
811c04 |
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
Harald Hoyer |
811c04 |
|
|
Harald Hoyer |
811c04 |
-[ -x /bin/plymouth -a ! -x /lib/systemd/systemd ] || exit 0
|
|
Harald Hoyer |
811c04 |
+[ -x /bin/plymouth -a -z "$DRACUT_SYSTEMD" ] || exit 0
|
|
Harald Hoyer |
811c04 |
/bin/plymouth --newroot=$NEWROOT
|
|
Harald Hoyer |
811c04 |
diff --git a/modules.d/50plymouth/plymouth-pretrigger.sh b/modules.d/50plymouth/plymouth-pretrigger.sh
|
|
Harald Hoyer |
811c04 |
index b282069..e536564 100755
|
|
Harald Hoyer |
811c04 |
--- a/modules.d/50plymouth/plymouth-pretrigger.sh
|
|
Harald Hoyer |
811c04 |
+++ b/modules.d/50plymouth/plymouth-pretrigger.sh
|
|
Harald Hoyer |
811c04 |
@@ -2,7 +2,7 @@
|
|
Harald Hoyer |
811c04 |
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
Harald Hoyer |
811c04 |
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
Harald Hoyer |
811c04 |
|
|
Harald Hoyer |
811c04 |
-[ -x /bin/plymouthd -a ! -x /lib/systemd/systemd ] || exit 0
|
|
Harald Hoyer |
811c04 |
+[ -x /bin/plymouthd -a ! -n "$DRACUT_SYSTEMD" ] || exit 0
|
|
Harald Hoyer |
811c04 |
|
|
Harald Hoyer |
811c04 |
if getargbool 1 plymouth.enable && getargbool 1 rd.plymouth -d -n rd_NO_PLYMOUTH; then
|
|
Harald Hoyer |
811c04 |
# first trigger graphics subsystem
|
|
Harald Hoyer |
811c04 |
diff --git a/modules.d/90crypt/parse-crypt.sh b/modules.d/90crypt/parse-crypt.sh
|
|
Harald Hoyer |
811c04 |
index a2b157f..e20e6e0 100755
|
|
Harald Hoyer |
811c04 |
--- a/modules.d/90crypt/parse-crypt.sh
|
|
Harald Hoyer |
811c04 |
+++ b/modules.d/90crypt/parse-crypt.sh
|
|
Harald Hoyer |
811c04 |
@@ -1,6 +1,9 @@
|
|
Harald Hoyer |
811c04 |
#!/bin/sh
|
|
Harald Hoyer |
811c04 |
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
Harald Hoyer |
811c04 |
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
Harald Hoyer |
811c04 |
+
|
|
Harald Hoyer |
811c04 |
+[ -n "$DRACUT_SYSTEMD" ] && exit 0
|
|
Harald Hoyer |
811c04 |
+
|
|
Harald Hoyer |
811c04 |
if ! getargbool 1 rd.luks -d -n rd_NO_LUKS; then
|
|
Harald Hoyer |
811c04 |
info "rd.luks=0: removing cryptoluks activation"
|
|
Harald Hoyer |
811c04 |
rm -f /etc/udev/rules.d/70-luks.rules
|
|
Harald Hoyer |
811c04 |
diff --git a/modules.d/98systemd/dracut-cmdline.sh b/modules.d/98systemd/dracut-cmdline.sh
|
|
Harald Hoyer |
811c04 |
index 927b99a..a366381 100755
|
|
Harald Hoyer |
811c04 |
--- a/modules.d/98systemd/dracut-cmdline.sh
|
|
Harald Hoyer |
811c04 |
+++ b/modules.d/98systemd/dracut-cmdline.sh
|
|
Harald Hoyer |
811c04 |
@@ -2,7 +2,8 @@
|
|
Harald Hoyer |
811c04 |
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
Harald Hoyer |
811c04 |
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
Harald Hoyer |
811c04 |
|
|
Harald Hoyer |
811c04 |
-NEWROOT="/sysroot"
|
|
Harald Hoyer |
811c04 |
+export DRACUT_SYSTEMD=1
|
|
Harald Hoyer |
811c04 |
+export NEWROOT="/sysroot"
|
|
Harald Hoyer |
811c04 |
[ -d $NEWROOT ] || mkdir -p -m 0755 $NEWROOT
|
|
Harald Hoyer |
811c04 |
[ -d /run/initramfs ] || mkdir -p -m 0755 /run/initramfs
|
|
Harald Hoyer |
811c04 |
[ -d /run/lock ] || mkdir -p -m 0755 /run/lock
|
|
Harald Hoyer |
811c04 |
diff --git a/modules.d/98systemd/dracut-initqueue.sh b/modules.d/98systemd/dracut-initqueue.sh
|
|
Harald Hoyer |
811c04 |
index 112d2a8..1ee6be1 100755
|
|
Harald Hoyer |
811c04 |
--- a/modules.d/98systemd/dracut-initqueue.sh
|
|
Harald Hoyer |
811c04 |
+++ b/modules.d/98systemd/dracut-initqueue.sh
|
|
Harald Hoyer |
811c04 |
@@ -2,6 +2,7 @@
|
|
Harald Hoyer |
811c04 |
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
Harald Hoyer |
811c04 |
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
Harald Hoyer |
811c04 |
|
|
Harald Hoyer |
811c04 |
+export DRACUT_SYSTEMD=1
|
|
Harald Hoyer |
811c04 |
if [ -f /dracut-state.sh ]; then
|
|
Harald Hoyer |
811c04 |
. /dracut-state.sh 2>/dev/null
|
|
Harald Hoyer |
811c04 |
fi
|
|
Harald Hoyer |
811c04 |
diff --git a/modules.d/98systemd/dracut-pre-pivot.sh b/modules.d/98systemd/dracut-pre-pivot.sh
|
|
Harald Hoyer |
811c04 |
index 3fd7957..1ffa6aa 100755
|
|
Harald Hoyer |
811c04 |
--- a/modules.d/98systemd/dracut-pre-pivot.sh
|
|
Harald Hoyer |
811c04 |
+++ b/modules.d/98systemd/dracut-pre-pivot.sh
|
|
Harald Hoyer |
811c04 |
@@ -2,6 +2,7 @@
|
|
Harald Hoyer |
811c04 |
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
Harald Hoyer |
811c04 |
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
Harald Hoyer |
811c04 |
|
|
Harald Hoyer |
811c04 |
+export DRACUT_SYSTEMD=1
|
|
Harald Hoyer |
811c04 |
if [ -f /dracut-state.sh ]; then
|
|
Harald Hoyer |
811c04 |
. /dracut-state.sh 2>/dev/null
|
|
Harald Hoyer |
811c04 |
fi
|
|
Harald Hoyer |
811c04 |
diff --git a/modules.d/98systemd/dracut-pre-trigger.sh b/modules.d/98systemd/dracut-pre-trigger.sh
|
|
Harald Hoyer |
811c04 |
index 9850124..20a3f64 100755
|
|
Harald Hoyer |
811c04 |
--- a/modules.d/98systemd/dracut-pre-trigger.sh
|
|
Harald Hoyer |
811c04 |
+++ b/modules.d/98systemd/dracut-pre-trigger.sh
|
|
Harald Hoyer |
811c04 |
@@ -2,6 +2,7 @@
|
|
Harald Hoyer |
811c04 |
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
Harald Hoyer |
811c04 |
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
Harald Hoyer |
811c04 |
|
|
Harald Hoyer |
811c04 |
+export DRACUT_SYSTEMD=1
|
|
Harald Hoyer |
811c04 |
if [ -f /dracut-state.sh ]; then
|
|
Harald Hoyer |
811c04 |
. /dracut-state.sh 2>/dev/null
|
|
Harald Hoyer |
811c04 |
fi
|
|
Harald Hoyer |
811c04 |
diff --git a/modules.d/98systemd/dracut-pre-udev.sh b/modules.d/98systemd/dracut-pre-udev.sh
|
|
Harald Hoyer |
811c04 |
index 2566ab9..9a4dc61 100755
|
|
Harald Hoyer |
811c04 |
--- a/modules.d/98systemd/dracut-pre-udev.sh
|
|
Harald Hoyer |
811c04 |
+++ b/modules.d/98systemd/dracut-pre-udev.sh
|
|
Harald Hoyer |
811c04 |
@@ -1,7 +1,7 @@
|
|
Harald Hoyer |
811c04 |
#!/bin/sh
|
|
Harald Hoyer |
811c04 |
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
Harald Hoyer |
811c04 |
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
Harald Hoyer |
811c04 |
-
|
|
Harald Hoyer |
811c04 |
+export DRACUT_SYSTEMD=1
|
|
Harald Hoyer |
811c04 |
if [ -f /dracut-state.sh ]; then
|
|
Harald Hoyer |
811c04 |
. /dracut-state.sh 2>/dev/null
|
|
Harald Hoyer |
811c04 |
fi
|
|
Harald Hoyer |
811c04 |
diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh
|
|
Harald Hoyer |
811c04 |
index 813cead..b4ef59a 100755
|
|
Harald Hoyer |
811c04 |
--- a/modules.d/99base/dracut-lib.sh
|
|
Harald Hoyer |
811c04 |
+++ b/modules.d/99base/dracut-lib.sh
|
|
Harald Hoyer |
811c04 |
@@ -358,7 +358,7 @@ check_quiet() {
|
|
Harald Hoyer |
811c04 |
fi
|
|
Harald Hoyer |
811c04 |
}
|
|
Harald Hoyer |
811c04 |
|
|
Harald Hoyer |
811c04 |
-if [ ! -x /lib/systemd/systemd ]; then
|
|
Harald Hoyer |
811c04 |
+if [ -z "$DRACUT_SYSTEMD" ]; then
|
|
Harald Hoyer |
811c04 |
|
|
Harald Hoyer |
811c04 |
warn() {
|
|
Harald Hoyer |
811c04 |
check_quiet
|