|
Harald Hoyer |
eeb1c2 |
From ca4108b78e04d6ee202efbeea13840fac46f76f6 Mon Sep 17 00:00:00 2001
|
|
Harald Hoyer |
eeb1c2 |
From: Tom Gundersen <teg@jklm.no>
|
|
Harald Hoyer |
eeb1c2 |
Date: Mon, 1 Dec 2014 16:59:09 +0100
|
|
Harald Hoyer |
eeb1c2 |
Subject: [PATCH] initrd-release: move from /etc to /usr/lib
|
|
Harald Hoyer |
eeb1c2 |
|
|
Harald Hoyer |
eeb1c2 |
This mimicks the similar move of os-release which was done in systemd. These
|
|
Harald Hoyer |
eeb1c2 |
files are not configuration, but part of the OS.
|
|
Harald Hoyer |
eeb1c2 |
|
|
Harald Hoyer |
eeb1c2 |
Still symlinks are in place for compatibility, but those should probably be
|
|
Harald Hoyer |
eeb1c2 |
dropped eventually.
|
|
Harald Hoyer |
eeb1c2 |
---
|
|
Harald Hoyer |
eeb1c2 |
modules.d/98systemd/dracut-cmdline-ask.service | 2 +-
|
|
Harald Hoyer |
eeb1c2 |
modules.d/98systemd/dracut-cmdline.service | 2 +-
|
|
Harald Hoyer |
eeb1c2 |
modules.d/98systemd/dracut-cmdline.sh | 2 +-
|
|
Harald Hoyer |
eeb1c2 |
modules.d/98systemd/dracut-initqueue.service | 2 +-
|
|
Harald Hoyer |
eeb1c2 |
modules.d/98systemd/dracut-mount.service | 2 +-
|
|
Harald Hoyer |
eeb1c2 |
modules.d/98systemd/dracut-pre-mount.service | 2 +-
|
|
Harald Hoyer |
eeb1c2 |
modules.d/98systemd/dracut-pre-pivot.service | 2 +-
|
|
Harald Hoyer |
eeb1c2 |
modules.d/98systemd/dracut-pre-trigger.service | 2 +-
|
|
Harald Hoyer |
eeb1c2 |
modules.d/98systemd/dracut-pre-udev.service | 2 +-
|
|
Harald Hoyer |
eeb1c2 |
modules.d/98systemd/initrd.target | 2 +-
|
|
Harald Hoyer |
eeb1c2 |
modules.d/99base/dracut-lib.sh | 2 +-
|
|
Harald Hoyer |
eeb1c2 |
modules.d/99base/init.sh | 2 +-
|
|
Harald Hoyer |
eeb1c2 |
modules.d/99base/module-setup.sh | 4 +++-
|
|
Harald Hoyer |
eeb1c2 |
13 files changed, 15 insertions(+), 13 deletions(-)
|
|
Harald Hoyer |
eeb1c2 |
|
|
Harald Hoyer |
eeb1c2 |
diff --git a/modules.d/98systemd/dracut-cmdline-ask.service b/modules.d/98systemd/dracut-cmdline-ask.service
|
|
Harald Hoyer |
eeb1c2 |
index 9993671..9a34b35 100644
|
|
Harald Hoyer |
eeb1c2 |
--- a/modules.d/98systemd/dracut-cmdline-ask.service
|
|
Harald Hoyer |
eeb1c2 |
+++ b/modules.d/98systemd/dracut-cmdline-ask.service
|
|
Harald Hoyer |
eeb1c2 |
@@ -13,7 +13,7 @@ DefaultDependencies=no
|
|
Harald Hoyer |
eeb1c2 |
Before=dracut-cmdline.service
|
|
Harald Hoyer |
eeb1c2 |
After=systemd-journald.socket
|
|
Harald Hoyer |
eeb1c2 |
Wants=systemd-journald.socket
|
|
Harald Hoyer |
eeb1c2 |
-ConditionPathExists=/etc/initrd-release
|
|
Harald Hoyer |
eeb1c2 |
+ConditionPathExists=/usr/lib/initrd-release
|
|
Harald Hoyer |
eeb1c2 |
ConditionKernelCommandLine=rd.cmdline=ask
|
|
Harald Hoyer |
eeb1c2 |
|
|
Harald Hoyer |
eeb1c2 |
[Service]
|
|
Harald Hoyer |
eeb1c2 |
diff --git a/modules.d/98systemd/dracut-cmdline.service b/modules.d/98systemd/dracut-cmdline.service
|
|
Harald Hoyer |
eeb1c2 |
index f888bf4..6eeb991 100644
|
|
Harald Hoyer |
eeb1c2 |
--- a/modules.d/98systemd/dracut-cmdline.service
|
|
Harald Hoyer |
eeb1c2 |
+++ b/modules.d/98systemd/dracut-cmdline.service
|
|
Harald Hoyer |
eeb1c2 |
@@ -14,7 +14,7 @@ DefaultDependencies=no
|
|
Harald Hoyer |
eeb1c2 |
Before=dracut-pre-udev.service
|
|
Harald Hoyer |
eeb1c2 |
After=systemd-journald.socket
|
|
Harald Hoyer |
eeb1c2 |
Wants=systemd-journald.socket
|
|
Harald Hoyer |
eeb1c2 |
-ConditionPathExists=/etc/initrd-release
|
|
Harald Hoyer |
eeb1c2 |
+ConditionPathExists=/usr/lib/initrd-release
|
|
Harald Hoyer |
eeb1c2 |
ConditionPathExistsGlob=|/etc/cmdline.d/*.conf
|
|
Harald Hoyer |
eeb1c2 |
ConditionDirectoryNotEmpty=|/lib/dracut/hooks/cmdline
|
|
Harald Hoyer |
eeb1c2 |
ConditionKernelCommandLine=|rd.break=cmdline
|
|
Harald Hoyer |
eeb1c2 |
diff --git a/modules.d/98systemd/dracut-cmdline.sh b/modules.d/98systemd/dracut-cmdline.sh
|
|
Harald Hoyer |
eeb1c2 |
index ad81501..871f81b 100755
|
|
Harald Hoyer |
eeb1c2 |
--- a/modules.d/98systemd/dracut-cmdline.sh
|
|
Harald Hoyer |
eeb1c2 |
+++ b/modules.d/98systemd/dracut-cmdline.sh
|
|
Harald Hoyer |
eeb1c2 |
@@ -5,7 +5,7 @@ if [ -f /dracut-state.sh ]; then
|
|
Harald Hoyer |
eeb1c2 |
fi
|
|
Harald Hoyer |
eeb1c2 |
type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
|
|
Harald Hoyer |
eeb1c2 |
|
|
Harald Hoyer |
eeb1c2 |
-[ -f /etc/initrd-release ] && . /etc/initrd-release
|
|
Harald Hoyer |
eeb1c2 |
+[ -f /usr/lib/initrd-release ] && . /usr/lib/initrd-release
|
|
Harald Hoyer |
eeb1c2 |
[ -n "$VERSION" ] && info "dracut-$VERSION"
|
|
Harald Hoyer |
eeb1c2 |
|
|
Harald Hoyer |
eeb1c2 |
if ! getargbool 1 'rd.hostonly'; then
|
|
Harald Hoyer |
eeb1c2 |
diff --git a/modules.d/98systemd/dracut-initqueue.service b/modules.d/98systemd/dracut-initqueue.service
|
|
Harald Hoyer |
eeb1c2 |
index 1b9e701..5d772f7 100644
|
|
Harald Hoyer |
eeb1c2 |
--- a/modules.d/98systemd/dracut-initqueue.service
|
|
Harald Hoyer |
eeb1c2 |
+++ b/modules.d/98systemd/dracut-initqueue.service
|
|
Harald Hoyer |
eeb1c2 |
@@ -15,7 +15,7 @@ Before=remote-fs-pre.target
|
|
Harald Hoyer |
eeb1c2 |
Wants=remote-fs-pre.target
|
|
Harald Hoyer |
eeb1c2 |
After=systemd-udev-trigger.service
|
|
Harald Hoyer |
eeb1c2 |
Wants=systemd-udev-trigger.service
|
|
Harald Hoyer |
eeb1c2 |
-ConditionPathExists=/etc/initrd-release
|
|
Harald Hoyer |
eeb1c2 |
+ConditionPathExists=/usr/lib/initrd-release
|
|
Harald Hoyer |
eeb1c2 |
ConditionPathExists=|/lib/dracut/need-initqueue
|
|
Harald Hoyer |
eeb1c2 |
ConditionPathExistsGlob=|/lib/dracut/hooks/initqueue/*.sh
|
|
Harald Hoyer |
eeb1c2 |
ConditionPathExistsGlob=|/lib/dracut/hooks/initqueue/settled/*.sh
|
|
Harald Hoyer |
eeb1c2 |
diff --git a/modules.d/98systemd/dracut-mount.service b/modules.d/98systemd/dracut-mount.service
|
|
Harald Hoyer |
eeb1c2 |
index 20c633d..1b14f4a 100644
|
|
Harald Hoyer |
eeb1c2 |
--- a/modules.d/98systemd/dracut-mount.service
|
|
Harald Hoyer |
eeb1c2 |
+++ b/modules.d/98systemd/dracut-mount.service
|
|
Harald Hoyer |
eeb1c2 |
@@ -12,7 +12,7 @@ Description=dracut mount hook
|
|
Harald Hoyer |
eeb1c2 |
Documentation=man:dracut-mount.service(8)
|
|
Harald Hoyer |
eeb1c2 |
After=initrd-root-fs.target initrd-parse-etc.service
|
|
Harald Hoyer |
eeb1c2 |
After=dracut-initqueue.service dracut-pre-mount.service
|
|
Harald Hoyer |
eeb1c2 |
-ConditionPathExists=/etc/initrd-release
|
|
Harald Hoyer |
eeb1c2 |
+ConditionPathExists=/usr/lib/initrd-release
|
|
Harald Hoyer |
eeb1c2 |
ConditionDirectoryNotEmpty=|/lib/dracut/hooks/mount
|
|
Harald Hoyer |
eeb1c2 |
ConditionKernelCommandLine=|rd.break=mount
|
|
Harald Hoyer |
eeb1c2 |
|
|
Harald Hoyer |
eeb1c2 |
diff --git a/modules.d/98systemd/dracut-pre-mount.service b/modules.d/98systemd/dracut-pre-mount.service
|
|
Harald Hoyer |
eeb1c2 |
index d7be48d..96ea995 100644
|
|
Harald Hoyer |
eeb1c2 |
--- a/modules.d/98systemd/dracut-pre-mount.service
|
|
Harald Hoyer |
eeb1c2 |
+++ b/modules.d/98systemd/dracut-pre-mount.service
|
|
Harald Hoyer |
eeb1c2 |
@@ -14,7 +14,7 @@ DefaultDependencies=no
|
|
Harald Hoyer |
eeb1c2 |
Before=initrd-root-fs.target sysroot.mount
|
|
Harald Hoyer |
eeb1c2 |
After=dracut-initqueue.service
|
|
Harald Hoyer |
eeb1c2 |
After=cryptsetup.target
|
|
Harald Hoyer |
eeb1c2 |
-ConditionPathExists=/etc/initrd-release
|
|
Harald Hoyer |
eeb1c2 |
+ConditionPathExists=/usr/lib/initrd-release
|
|
Harald Hoyer |
eeb1c2 |
ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-mount
|
|
Harald Hoyer |
eeb1c2 |
ConditionKernelCommandLine=|rd.break=pre-mount
|
|
Harald Hoyer |
eeb1c2 |
|
|
Harald Hoyer |
eeb1c2 |
diff --git a/modules.d/98systemd/dracut-pre-pivot.service b/modules.d/98systemd/dracut-pre-pivot.service
|
|
Harald Hoyer |
eeb1c2 |
index d7c7b1d..f5a85ce 100644
|
|
Harald Hoyer |
eeb1c2 |
--- a/modules.d/98systemd/dracut-pre-pivot.service
|
|
Harald Hoyer |
eeb1c2 |
+++ b/modules.d/98systemd/dracut-pre-pivot.service
|
|
Harald Hoyer |
eeb1c2 |
@@ -15,7 +15,7 @@ After=dracut-initqueue.service dracut-pre-mount.service dracut-mount.service
|
|
Harald Hoyer |
eeb1c2 |
Before=initrd-cleanup.service
|
|
Harald Hoyer |
eeb1c2 |
Wants=remote-fs.target
|
|
Harald Hoyer |
eeb1c2 |
After=remote-fs.target
|
|
Harald Hoyer |
eeb1c2 |
-ConditionPathExists=/etc/initrd-release
|
|
Harald Hoyer |
eeb1c2 |
+ConditionPathExists=/usr/lib/initrd-release
|
|
Harald Hoyer |
eeb1c2 |
ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-pivot
|
|
Harald Hoyer |
eeb1c2 |
ConditionDirectoryNotEmpty=|/lib/dracut/hooks/cleanup
|
|
Harald Hoyer |
eeb1c2 |
ConditionKernelCommandLine=|rd.break=pre-pivot
|
|
Harald Hoyer |
eeb1c2 |
diff --git a/modules.d/98systemd/dracut-pre-trigger.service b/modules.d/98systemd/dracut-pre-trigger.service
|
|
Harald Hoyer |
eeb1c2 |
index 69b4cce..826b89b 100644
|
|
Harald Hoyer |
eeb1c2 |
--- a/modules.d/98systemd/dracut-pre-trigger.service
|
|
Harald Hoyer |
eeb1c2 |
+++ b/modules.d/98systemd/dracut-pre-trigger.service
|
|
Harald Hoyer |
eeb1c2 |
@@ -14,7 +14,7 @@ DefaultDependencies=no
|
|
Harald Hoyer |
eeb1c2 |
Before=systemd-udev-trigger.service dracut-initqueue.service
|
|
Harald Hoyer |
eeb1c2 |
After=dracut-pre-udev.service systemd-udevd.service systemd-tmpfiles-setup-dev.service
|
|
Harald Hoyer |
eeb1c2 |
Wants=dracut-pre-udev.service systemd-udevd.service
|
|
Harald Hoyer |
eeb1c2 |
-ConditionPathExists=/etc/initrd-release
|
|
Harald Hoyer |
eeb1c2 |
+ConditionPathExists=/usr/lib/initrd-release
|
|
Harald Hoyer |
eeb1c2 |
ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-trigger
|
|
Harald Hoyer |
eeb1c2 |
ConditionKernelCommandLine=|rd.break=pre-trigger
|
|
Harald Hoyer |
eeb1c2 |
|
|
Harald Hoyer |
eeb1c2 |
diff --git a/modules.d/98systemd/dracut-pre-udev.service b/modules.d/98systemd/dracut-pre-udev.service
|
|
Harald Hoyer |
eeb1c2 |
index d125b37..73740be 100644
|
|
Harald Hoyer |
eeb1c2 |
--- a/modules.d/98systemd/dracut-pre-udev.service
|
|
Harald Hoyer |
eeb1c2 |
+++ b/modules.d/98systemd/dracut-pre-udev.service
|
|
Harald Hoyer |
eeb1c2 |
@@ -14,7 +14,7 @@ DefaultDependencies=no
|
|
Harald Hoyer |
eeb1c2 |
Before=systemd-udevd.service dracut-pre-trigger.service
|
|
Harald Hoyer |
eeb1c2 |
After=dracut-cmdline.service
|
|
Harald Hoyer |
eeb1c2 |
Wants=dracut-cmdline.service
|
|
Harald Hoyer |
eeb1c2 |
-ConditionPathExists=/etc/initrd-release
|
|
Harald Hoyer |
eeb1c2 |
+ConditionPathExists=/usr/lib/initrd-release
|
|
Harald Hoyer |
eeb1c2 |
ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-udev
|
|
Harald Hoyer |
eeb1c2 |
ConditionKernelCommandLine=|rd.break=pre-udev
|
|
Harald Hoyer |
eeb1c2 |
ConditionKernelCommandLine=|rd.driver.blacklist
|
|
Harald Hoyer |
eeb1c2 |
diff --git a/modules.d/98systemd/initrd.target b/modules.d/98systemd/initrd.target
|
|
Harald Hoyer |
eeb1c2 |
index 19494d4..4b7e7da 100644
|
|
Harald Hoyer |
eeb1c2 |
--- a/modules.d/98systemd/initrd.target
|
|
Harald Hoyer |
eeb1c2 |
+++ b/modules.d/98systemd/initrd.target
|
|
Harald Hoyer |
eeb1c2 |
@@ -6,4 +6,4 @@ After=basic.target rescue.service rescue.target
|
|
Harald Hoyer |
eeb1c2 |
AllowIsolate=yes
|
|
Harald Hoyer |
eeb1c2 |
OnFailure=emergency.target
|
|
Harald Hoyer |
eeb1c2 |
OnFailureIsolate=yes
|
|
Harald Hoyer |
eeb1c2 |
-ConditionPathExists=/etc/initrd-release
|
|
Harald Hoyer |
eeb1c2 |
+ConditionPathExists=/usr/lib/initrd-release
|
|
Harald Hoyer |
eeb1c2 |
diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh
|
|
Harald Hoyer |
eeb1c2 |
index 0a89cc8..5fc5615 100755
|
|
Harald Hoyer |
eeb1c2 |
--- a/modules.d/99base/dracut-lib.sh
|
|
Harald Hoyer |
eeb1c2 |
+++ b/modules.d/99base/dracut-lib.sh
|
|
Harald Hoyer |
eeb1c2 |
@@ -393,7 +393,7 @@ splitsep() {
|
|
Harald Hoyer |
eeb1c2 |
}
|
|
Harald Hoyer |
eeb1c2 |
|
|
Harald Hoyer |
eeb1c2 |
setdebug() {
|
|
Harald Hoyer |
eeb1c2 |
- [ -f /etc/initrd-release ] || return
|
|
Harald Hoyer |
eeb1c2 |
+ [ -f /usr/lib/initrd-release ] || return
|
|
Harald Hoyer |
eeb1c2 |
if [ -z "$RD_DEBUG" ]; then
|
|
Harald Hoyer |
eeb1c2 |
if [ -e /proc/cmdline ]; then
|
|
Harald Hoyer |
eeb1c2 |
RD_DEBUG=no
|
|
Harald Hoyer |
eeb1c2 |
diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh
|
|
Harald Hoyer |
eeb1c2 |
index 5f66d1f..7fcea4a 100755
|
|
Harald Hoyer |
eeb1c2 |
--- a/modules.d/99base/init.sh
|
|
Harald Hoyer |
eeb1c2 |
+++ b/modules.d/99base/init.sh
|
|
Harald Hoyer |
eeb1c2 |
@@ -106,7 +106,7 @@ else
|
|
Harald Hoyer |
eeb1c2 |
exec 0<>/dev/console 1<>/dev/console 2<>/dev/console
|
|
Harald Hoyer |
eeb1c2 |
fi
|
|
Harald Hoyer |
eeb1c2 |
|
|
Harald Hoyer |
eeb1c2 |
-[ -f /etc/initrd-release ] && . /etc/initrd-release
|
|
Harald Hoyer |
eeb1c2 |
+[ -f /usr/lib/initrd-release ] && . /usr/lib/initrd-release
|
|
Harald Hoyer |
eeb1c2 |
[ -n "$VERSION_ID" ] && info "$NAME-$VERSION_ID"
|
|
Harald Hoyer |
eeb1c2 |
|
|
Harald Hoyer |
eeb1c2 |
source_conf /etc/conf.d
|
|
Harald Hoyer |
eeb1c2 |
diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh
|
|
Harald Hoyer |
eeb1c2 |
index fab4a78..7d30320 100755
|
|
Harald Hoyer |
eeb1c2 |
--- a/modules.d/99base/module-setup.sh
|
|
Harald Hoyer |
eeb1c2 |
+++ b/modules.d/99base/module-setup.sh
|
|
Harald Hoyer |
eeb1c2 |
@@ -88,8 +88,10 @@ install() {
|
|
Harald Hoyer |
eeb1c2 |
echo VERSION_ID=$VERSION_ID
|
|
Harald Hoyer |
eeb1c2 |
echo PRETTY_NAME=\"$PRETTY_NAME\"
|
|
Harald Hoyer |
eeb1c2 |
echo ANSI_COLOR=\"$ANSI_COLOR\"
|
|
Harald Hoyer |
eeb1c2 |
- } > $initdir/etc/initrd-release
|
|
Harald Hoyer |
eeb1c2 |
+ } > $initdir/usr/lib/initrd-release
|
|
Harald Hoyer |
eeb1c2 |
echo dracut-$DRACUT_VERSION > $initdir/lib/dracut/dracut-$DRACUT_VERSION
|
|
Harald Hoyer |
eeb1c2 |
+ ln -sf ../usr/lib/initrd-release $initdir/etc/initrd-release
|
|
Harald Hoyer |
eeb1c2 |
+ ln -sf initrd-release $initdir/usr/lib/os-release
|
|
Harald Hoyer |
eeb1c2 |
ln -sf initrd-release $initdir/etc/os-release
|
|
Harald Hoyer |
eeb1c2 |
|
|
Harald Hoyer |
eeb1c2 |
## save host_devs which we need bring up
|