]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
systemd: set environment vars DRACUT_SYSTEMD, NEWROOT in service file
authorHarald Hoyer <harald@redhat.com>
Tue, 28 May 2013 10:50:57 +0000 (12:50 +0200)
committerHarald Hoyer <harald@redhat.com>
Tue, 28 May 2013 10:50:57 +0000 (12:50 +0200)
modules.d/98systemd/dracut-cmdline.service
modules.d/98systemd/dracut-cmdline.sh
modules.d/98systemd/dracut-emergency.service
modules.d/98systemd/dracut-initqueue.service
modules.d/98systemd/dracut-mount.service
modules.d/98systemd/dracut-pre-mount.service
modules.d/98systemd/dracut-pre-pivot.service
modules.d/98systemd/dracut-pre-trigger.service
modules.d/98systemd/dracut-pre-udev.service
modules.d/98systemd/emergency.service
modules.d/98systemd/rescue.service

index 33a37f9f8dff2842ded31d9b41fdc23e7053dcbe..07f6939025d6696094225825498e9c9ee31d10d7 100644 (file)
@@ -23,6 +23,8 @@ ConditionKernelCommandLine=|resume
 ConditionKernelCommandLine=|noresume
 
 [Service]
+Environment=DRACUT_SYSTEMD=1
+Environment=NEWROOT=/sysroot
 Type=oneshot
 ExecStart=-/bin/dracut-cmdline
 StandardInput=null
index ad51142d0134af7d684eefe5dc0b0cd297e7ba68..a6738bdbfec42e28b1b48820f0694ea6435050af 100755 (executable)
@@ -2,8 +2,6 @@
 # -*- 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
-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 153931b284f6f309266c741894816e79ebc64fe9..12eef6cbd6154d5e90d11a67a02652c521b3ae95 100644 (file)
@@ -16,6 +16,8 @@ Conflicts=emergency.service emergency.target
 
 [Service]
 Environment=HOME=/
+Environment=DRACUT_SYSTEMD=1
+Environment=NEWROOT=/sysroot
 WorkingDirectory=/
 ExecStart=/bin/dracut-emergency
 ExecStopPost=-/bin/rm -f /.console_lock
index c19cfea5d00cf0c33a46845da0dc0fec64a58d51..f4c1dd49597a21f887ae603376ceed1ff5457cf0 100644 (file)
@@ -19,6 +19,8 @@ ConditionPathExistsGlob=|/lib/dracut/hooks/initqueue/*.sh
 ConditionKernelCommandLine=|rd.break=pre-mount
 
 [Service]
+Environment=DRACUT_SYSTEMD=1
+Environment=NEWROOT=/sysroot
 Type=oneshot
 ExecStart=-/bin/dracut-initqueue
 StandardInput=null
index db18f86e1844750ef15f6665193d34a0c4223847..20c633d034ae56a7f56be0d8b2222900c4a99125 100644 (file)
@@ -17,6 +17,8 @@ ConditionDirectoryNotEmpty=|/lib/dracut/hooks/mount
 ConditionKernelCommandLine=|rd.break=mount
 
 [Service]
+Environment=DRACUT_SYSTEMD=1
+Environment=NEWROOT=/sysroot
 Type=oneshot
 ExecStart=-/bin/dracut-mount
 StandardInput=null
index bec3c7576f66274780a30517d9734c48d5076923..d7be48d87cee447f7cd715bd1e8507db8195633e 100644 (file)
@@ -19,6 +19,8 @@ ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-mount
 ConditionKernelCommandLine=|rd.break=pre-mount
 
 [Service]
+Environment=DRACUT_SYSTEMD=1
+Environment=NEWROOT=/sysroot
 Type=oneshot
 ExecStart=-/bin/dracut-pre-mount
 StandardInput=null
index 9d0143c56e36be16ab80fc710daf84f541e6ba00..36394aa071896a9945f2daf3a0fd29f17a5377d0 100644 (file)
@@ -18,6 +18,8 @@ ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-pivot
 ConditionKernelCommandLine=|rd.break=pre-pivot
 
 [Service]
+Environment=DRACUT_SYSTEMD=1
+Environment=NEWROOT=/sysroot
 Type=oneshot
 ExecStart=-/bin/dracut-pre-pivot
 StandardInput=null
index e49e405a2d160c2728e20f8a72c3a94396802abe..bb341967264dde304a2492b80ca3479e2f60d70e 100644 (file)
@@ -19,6 +19,8 @@ ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-trigger
 ConditionKernelCommandLine=|rd.break=pre-trigger
 
 [Service]
+Environment=DRACUT_SYSTEMD=1
+Environment=NEWROOT=/sysroot
 Type=oneshot
 ExecStart=-/bin/dracut-pre-trigger
 StandardInput=null
index b3723738e63376b651c993fc156bca29f3164c36..d125b375bdf41411d2bcdace9d4b9fa14f201e27 100644 (file)
@@ -22,6 +22,8 @@ ConditionKernelCommandLine=|rd.driver.pre
 ConditionKernelCommandLine=|rd.driver.post
 
 [Service]
+Environment=DRACUT_SYSTEMD=1
+Environment=NEWROOT=/sysroot
 Type=oneshot
 ExecStart=-/bin/dracut-pre-udev
 StandardInput=null
index a9327391cb36d8b37692e34f88ca561237bb8e79..35d9c3172d1c6245bda7f972dc9b7899a9b9d9d0 100644 (file)
@@ -15,6 +15,8 @@ Wants=systemd-vconsole-setup.service
 
 [Service]
 Environment=HOME=/
+Environment=DRACUT_SYSTEMD=1
+Environment=NEWROOT=/sysroot
 WorkingDirectory=/
 ExecStart=/bin/dracut-emergency
 ExecStopPost=-/usr/bin/systemctl --fail --no-block default
index b5fb6638789c53d51d9eed14670ac7463425c91e..62f20673a84b3e7bddda54af3f9f5b307cfc3802 100644 (file)
@@ -13,6 +13,8 @@ DefaultDependencies=no
 
 [Service]
 Environment=HOME=/
+Environment=DRACUT_SYSTEMD=1
+Environment=NEWROOT=/sysroot
 WorkingDirectory=/
 ExecStartPre=-/bin/plymouth quit
 ExecStart=-/bin/sh -i -l