|
Harald Hoyer |
75f812 |
From 780cb337416a21b000353d1f2dbb362690265b3b Mon Sep 17 00:00:00 2001
|
|
Harald Hoyer |
75f812 |
From: Harald Hoyer <harald@redhat.com>
|
|
Harald Hoyer |
75f812 |
Date: Tue, 28 May 2013 12:50:57 +0200
|
|
Harald Hoyer |
75f812 |
Subject: [PATCH] systemd: set environment vars DRACUT_SYSTEMD, NEWROOT in
|
|
Harald Hoyer |
75f812 |
service file
|
|
Harald Hoyer |
75f812 |
|
|
Harald Hoyer |
75f812 |
---
|
|
Harald Hoyer |
75f812 |
modules.d/98systemd/dracut-cmdline.service | 2 ++
|
|
Harald Hoyer |
75f812 |
modules.d/98systemd/dracut-cmdline.sh | 2 --
|
|
Harald Hoyer |
75f812 |
modules.d/98systemd/dracut-emergency.service | 2 ++
|
|
Harald Hoyer |
75f812 |
modules.d/98systemd/dracut-initqueue.service | 2 ++
|
|
Harald Hoyer |
75f812 |
modules.d/98systemd/dracut-mount.service | 2 ++
|
|
Harald Hoyer |
75f812 |
modules.d/98systemd/dracut-pre-mount.service | 2 ++
|
|
Harald Hoyer |
75f812 |
modules.d/98systemd/dracut-pre-pivot.service | 2 ++
|
|
Harald Hoyer |
75f812 |
modules.d/98systemd/dracut-pre-trigger.service | 2 ++
|
|
Harald Hoyer |
75f812 |
modules.d/98systemd/dracut-pre-udev.service | 2 ++
|
|
Harald Hoyer |
75f812 |
modules.d/98systemd/emergency.service | 2 ++
|
|
Harald Hoyer |
75f812 |
modules.d/98systemd/rescue.service | 2 ++
|
|
Harald Hoyer |
75f812 |
11 files changed, 20 insertions(+), 2 deletions(-)
|
|
Harald Hoyer |
75f812 |
|
|
Harald Hoyer |
75f812 |
diff --git a/modules.d/98systemd/dracut-cmdline.service b/modules.d/98systemd/dracut-cmdline.service
|
|
Harald Hoyer |
75f812 |
index 33a37f9..07f6939 100644
|
|
Harald Hoyer |
75f812 |
--- a/modules.d/98systemd/dracut-cmdline.service
|
|
Harald Hoyer |
75f812 |
+++ b/modules.d/98systemd/dracut-cmdline.service
|
|
Harald Hoyer |
75f812 |
@@ -23,6 +23,8 @@ ConditionKernelCommandLine=|resume
|
|
Harald Hoyer |
75f812 |
ConditionKernelCommandLine=|noresume
|
|
Harald Hoyer |
75f812 |
|
|
Harald Hoyer |
75f812 |
[Service]
|
|
Harald Hoyer |
75f812 |
+Environment=DRACUT_SYSTEMD=1
|
|
Harald Hoyer |
75f812 |
+Environment=NEWROOT=/sysroot
|
|
Harald Hoyer |
75f812 |
Type=oneshot
|
|
Harald Hoyer |
75f812 |
ExecStart=-/bin/dracut-cmdline
|
|
Harald Hoyer |
75f812 |
StandardInput=null
|
|
Harald Hoyer |
75f812 |
diff --git a/modules.d/98systemd/dracut-cmdline.sh b/modules.d/98systemd/dracut-cmdline.sh
|
|
Harald Hoyer |
75f812 |
index ad51142..a6738bd 100755
|
|
Harald Hoyer |
75f812 |
--- a/modules.d/98systemd/dracut-cmdline.sh
|
|
Harald Hoyer |
75f812 |
+++ b/modules.d/98systemd/dracut-cmdline.sh
|
|
Harald Hoyer |
75f812 |
@@ -2,8 +2,6 @@
|
|
Harald Hoyer |
75f812 |
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
Harald Hoyer |
75f812 |
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
Harald Hoyer |
75f812 |
|
|
Harald Hoyer |
75f812 |
-export DRACUT_SYSTEMD=1
|
|
Harald Hoyer |
75f812 |
-export NEWROOT="/sysroot"
|
|
Harald Hoyer |
75f812 |
[ -d $NEWROOT ] || mkdir -p -m 0755 $NEWROOT
|
|
Harald Hoyer |
75f812 |
[ -d /run/initramfs ] || mkdir -p -m 0755 /run/initramfs
|
|
Harald Hoyer |
75f812 |
[ -d /run/lock ] || mkdir -p -m 0755 /run/lock
|
|
Harald Hoyer |
75f812 |
diff --git a/modules.d/98systemd/dracut-emergency.service b/modules.d/98systemd/dracut-emergency.service
|
|
Harald Hoyer |
75f812 |
index 153931b..12eef6c 100644
|
|
Harald Hoyer |
75f812 |
--- a/modules.d/98systemd/dracut-emergency.service
|
|
Harald Hoyer |
75f812 |
+++ b/modules.d/98systemd/dracut-emergency.service
|
|
Harald Hoyer |
75f812 |
@@ -16,6 +16,8 @@ Conflicts=emergency.service emergency.target
|
|
Harald Hoyer |
75f812 |
|
|
Harald Hoyer |
75f812 |
[Service]
|
|
Harald Hoyer |
75f812 |
Environment=HOME=/
|
|
Harald Hoyer |
75f812 |
+Environment=DRACUT_SYSTEMD=1
|
|
Harald Hoyer |
75f812 |
+Environment=NEWROOT=/sysroot
|
|
Harald Hoyer |
75f812 |
WorkingDirectory=/
|
|
Harald Hoyer |
75f812 |
ExecStart=/bin/dracut-emergency
|
|
Harald Hoyer |
75f812 |
ExecStopPost=-/bin/rm -f /.console_lock
|
|
Harald Hoyer |
75f812 |
diff --git a/modules.d/98systemd/dracut-initqueue.service b/modules.d/98systemd/dracut-initqueue.service
|
|
Harald Hoyer |
75f812 |
index c19cfea..f4c1dd4 100644
|
|
Harald Hoyer |
75f812 |
--- a/modules.d/98systemd/dracut-initqueue.service
|
|
Harald Hoyer |
75f812 |
+++ b/modules.d/98systemd/dracut-initqueue.service
|
|
Harald Hoyer |
75f812 |
@@ -19,6 +19,8 @@ ConditionPathExistsGlob=|/lib/dracut/hooks/initqueue/*.sh
|
|
Harald Hoyer |
75f812 |
ConditionKernelCommandLine=|rd.break=pre-mount
|
|
Harald Hoyer |
75f812 |
|
|
Harald Hoyer |
75f812 |
[Service]
|
|
Harald Hoyer |
75f812 |
+Environment=DRACUT_SYSTEMD=1
|
|
Harald Hoyer |
75f812 |
+Environment=NEWROOT=/sysroot
|
|
Harald Hoyer |
75f812 |
Type=oneshot
|
|
Harald Hoyer |
75f812 |
ExecStart=-/bin/dracut-initqueue
|
|
Harald Hoyer |
75f812 |
StandardInput=null
|
|
Harald Hoyer |
75f812 |
diff --git a/modules.d/98systemd/dracut-mount.service b/modules.d/98systemd/dracut-mount.service
|
|
Harald Hoyer |
75f812 |
index db18f86..20c633d 100644
|
|
Harald Hoyer |
75f812 |
--- a/modules.d/98systemd/dracut-mount.service
|
|
Harald Hoyer |
75f812 |
+++ b/modules.d/98systemd/dracut-mount.service
|
|
Harald Hoyer |
75f812 |
@@ -17,6 +17,8 @@ ConditionDirectoryNotEmpty=|/lib/dracut/hooks/mount
|
|
Harald Hoyer |
75f812 |
ConditionKernelCommandLine=|rd.break=mount
|
|
Harald Hoyer |
75f812 |
|
|
Harald Hoyer |
75f812 |
[Service]
|
|
Harald Hoyer |
75f812 |
+Environment=DRACUT_SYSTEMD=1
|
|
Harald Hoyer |
75f812 |
+Environment=NEWROOT=/sysroot
|
|
Harald Hoyer |
75f812 |
Type=oneshot
|
|
Harald Hoyer |
75f812 |
ExecStart=-/bin/dracut-mount
|
|
Harald Hoyer |
75f812 |
StandardInput=null
|
|
Harald Hoyer |
75f812 |
diff --git a/modules.d/98systemd/dracut-pre-mount.service b/modules.d/98systemd/dracut-pre-mount.service
|
|
Harald Hoyer |
75f812 |
index bec3c75..d7be48d 100644
|
|
Harald Hoyer |
75f812 |
--- a/modules.d/98systemd/dracut-pre-mount.service
|
|
Harald Hoyer |
75f812 |
+++ b/modules.d/98systemd/dracut-pre-mount.service
|
|
Harald Hoyer |
75f812 |
@@ -19,6 +19,8 @@ ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-mount
|
|
Harald Hoyer |
75f812 |
ConditionKernelCommandLine=|rd.break=pre-mount
|
|
Harald Hoyer |
75f812 |
|
|
Harald Hoyer |
75f812 |
[Service]
|
|
Harald Hoyer |
75f812 |
+Environment=DRACUT_SYSTEMD=1
|
|
Harald Hoyer |
75f812 |
+Environment=NEWROOT=/sysroot
|
|
Harald Hoyer |
75f812 |
Type=oneshot
|
|
Harald Hoyer |
75f812 |
ExecStart=-/bin/dracut-pre-mount
|
|
Harald Hoyer |
75f812 |
StandardInput=null
|
|
Harald Hoyer |
75f812 |
diff --git a/modules.d/98systemd/dracut-pre-pivot.service b/modules.d/98systemd/dracut-pre-pivot.service
|
|
Harald Hoyer |
75f812 |
index 9d0143c..36394aa 100644
|
|
Harald Hoyer |
75f812 |
--- a/modules.d/98systemd/dracut-pre-pivot.service
|
|
Harald Hoyer |
75f812 |
+++ b/modules.d/98systemd/dracut-pre-pivot.service
|
|
Harald Hoyer |
75f812 |
@@ -18,6 +18,8 @@ ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-pivot
|
|
Harald Hoyer |
75f812 |
ConditionKernelCommandLine=|rd.break=pre-pivot
|
|
Harald Hoyer |
75f812 |
|
|
Harald Hoyer |
75f812 |
[Service]
|
|
Harald Hoyer |
75f812 |
+Environment=DRACUT_SYSTEMD=1
|
|
Harald Hoyer |
75f812 |
+Environment=NEWROOT=/sysroot
|
|
Harald Hoyer |
75f812 |
Type=oneshot
|
|
Harald Hoyer |
75f812 |
ExecStart=-/bin/dracut-pre-pivot
|
|
Harald Hoyer |
75f812 |
StandardInput=null
|
|
Harald Hoyer |
75f812 |
diff --git a/modules.d/98systemd/dracut-pre-trigger.service b/modules.d/98systemd/dracut-pre-trigger.service
|
|
Harald Hoyer |
75f812 |
index e49e405..bb34196 100644
|
|
Harald Hoyer |
75f812 |
--- a/modules.d/98systemd/dracut-pre-trigger.service
|
|
Harald Hoyer |
75f812 |
+++ b/modules.d/98systemd/dracut-pre-trigger.service
|
|
Harald Hoyer |
75f812 |
@@ -19,6 +19,8 @@ ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-trigger
|
|
Harald Hoyer |
75f812 |
ConditionKernelCommandLine=|rd.break=pre-trigger
|
|
Harald Hoyer |
75f812 |
|
|
Harald Hoyer |
75f812 |
[Service]
|
|
Harald Hoyer |
75f812 |
+Environment=DRACUT_SYSTEMD=1
|
|
Harald Hoyer |
75f812 |
+Environment=NEWROOT=/sysroot
|
|
Harald Hoyer |
75f812 |
Type=oneshot
|
|
Harald Hoyer |
75f812 |
ExecStart=-/bin/dracut-pre-trigger
|
|
Harald Hoyer |
75f812 |
StandardInput=null
|
|
Harald Hoyer |
75f812 |
diff --git a/modules.d/98systemd/dracut-pre-udev.service b/modules.d/98systemd/dracut-pre-udev.service
|
|
Harald Hoyer |
75f812 |
index b372373..d125b37 100644
|
|
Harald Hoyer |
75f812 |
--- a/modules.d/98systemd/dracut-pre-udev.service
|
|
Harald Hoyer |
75f812 |
+++ b/modules.d/98systemd/dracut-pre-udev.service
|
|
Harald Hoyer |
75f812 |
@@ -22,6 +22,8 @@ ConditionKernelCommandLine=|rd.driver.pre
|
|
Harald Hoyer |
75f812 |
ConditionKernelCommandLine=|rd.driver.post
|
|
Harald Hoyer |
75f812 |
|
|
Harald Hoyer |
75f812 |
[Service]
|
|
Harald Hoyer |
75f812 |
+Environment=DRACUT_SYSTEMD=1
|
|
Harald Hoyer |
75f812 |
+Environment=NEWROOT=/sysroot
|
|
Harald Hoyer |
75f812 |
Type=oneshot
|
|
Harald Hoyer |
75f812 |
ExecStart=-/bin/dracut-pre-udev
|
|
Harald Hoyer |
75f812 |
StandardInput=null
|
|
Harald Hoyer |
75f812 |
diff --git a/modules.d/98systemd/emergency.service b/modules.d/98systemd/emergency.service
|
|
Harald Hoyer |
75f812 |
index a932739..35d9c31 100644
|
|
Harald Hoyer |
75f812 |
--- a/modules.d/98systemd/emergency.service
|
|
Harald Hoyer |
75f812 |
+++ b/modules.d/98systemd/emergency.service
|
|
Harald Hoyer |
75f812 |
@@ -15,6 +15,8 @@ Wants=systemd-vconsole-setup.service
|
|
Harald Hoyer |
75f812 |
|
|
Harald Hoyer |
75f812 |
[Service]
|
|
Harald Hoyer |
75f812 |
Environment=HOME=/
|
|
Harald Hoyer |
75f812 |
+Environment=DRACUT_SYSTEMD=1
|
|
Harald Hoyer |
75f812 |
+Environment=NEWROOT=/sysroot
|
|
Harald Hoyer |
75f812 |
WorkingDirectory=/
|
|
Harald Hoyer |
75f812 |
ExecStart=/bin/dracut-emergency
|
|
Harald Hoyer |
75f812 |
ExecStopPost=-/usr/bin/systemctl --fail --no-block default
|
|
Harald Hoyer |
75f812 |
diff --git a/modules.d/98systemd/rescue.service b/modules.d/98systemd/rescue.service
|
|
Harald Hoyer |
75f812 |
index b5fb663..62f2067 100644
|
|
Harald Hoyer |
75f812 |
--- a/modules.d/98systemd/rescue.service
|
|
Harald Hoyer |
75f812 |
+++ b/modules.d/98systemd/rescue.service
|
|
Harald Hoyer |
75f812 |
@@ -13,6 +13,8 @@ DefaultDependencies=no
|
|
Harald Hoyer |
75f812 |
|
|
Harald Hoyer |
75f812 |
[Service]
|
|
Harald Hoyer |
75f812 |
Environment=HOME=/
|
|
Harald Hoyer |
75f812 |
+Environment=DRACUT_SYSTEMD=1
|
|
Harald Hoyer |
75f812 |
+Environment=NEWROOT=/sysroot
|
|
Harald Hoyer |
75f812 |
WorkingDirectory=/
|
|
Harald Hoyer |
75f812 |
ExecStartPre=-/bin/plymouth quit
|
|
Harald Hoyer |
75f812 |
ExecStart=-/bin/sh -i -l
|