initrd-release: move from /etc to /usr/lib

This mimicks the similar move of os-release which was done in systemd. These
files are not configuration, but part of the OS.

Still symlinks are in place for compatibility, but those should probably be
dropped eventually.
master
Tom Gundersen 2014-12-01 16:59:09 +01:00 committed by Harald Hoyer
parent c440d302f1
commit ca4108b78e
13 changed files with 15 additions and 13 deletions

View File

@ -13,7 +13,7 @@ DefaultDependencies=no
Before=dracut-cmdline.service Before=dracut-cmdline.service
After=systemd-journald.socket After=systemd-journald.socket
Wants=systemd-journald.socket Wants=systemd-journald.socket
ConditionPathExists=/etc/initrd-release ConditionPathExists=/usr/lib/initrd-release
ConditionKernelCommandLine=rd.cmdline=ask ConditionKernelCommandLine=rd.cmdline=ask


[Service] [Service]

View File

@ -14,7 +14,7 @@ DefaultDependencies=no
Before=dracut-pre-udev.service Before=dracut-pre-udev.service
After=systemd-journald.socket After=systemd-journald.socket
Wants=systemd-journald.socket Wants=systemd-journald.socket
ConditionPathExists=/etc/initrd-release ConditionPathExists=/usr/lib/initrd-release
ConditionPathExistsGlob=|/etc/cmdline.d/*.conf ConditionPathExistsGlob=|/etc/cmdline.d/*.conf
ConditionDirectoryNotEmpty=|/lib/dracut/hooks/cmdline ConditionDirectoryNotEmpty=|/lib/dracut/hooks/cmdline
ConditionKernelCommandLine=|rd.break=cmdline ConditionKernelCommandLine=|rd.break=cmdline

View File

@ -5,7 +5,7 @@ if [ -f /dracut-state.sh ]; then
fi fi
type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh


[ -f /etc/initrd-release ] && . /etc/initrd-release [ -f /usr/lib/initrd-release ] && . /usr/lib/initrd-release
[ -n "$VERSION" ] && info "dracut-$VERSION" [ -n "$VERSION" ] && info "dracut-$VERSION"


if ! getargbool 1 'rd.hostonly'; then if ! getargbool 1 'rd.hostonly'; then

View File

@ -15,7 +15,7 @@ Before=remote-fs-pre.target
Wants=remote-fs-pre.target Wants=remote-fs-pre.target
After=systemd-udev-trigger.service After=systemd-udev-trigger.service
Wants=systemd-udev-trigger.service Wants=systemd-udev-trigger.service
ConditionPathExists=/etc/initrd-release ConditionPathExists=/usr/lib/initrd-release
ConditionPathExists=|/lib/dracut/need-initqueue ConditionPathExists=|/lib/dracut/need-initqueue
ConditionPathExistsGlob=|/lib/dracut/hooks/initqueue/*.sh ConditionPathExistsGlob=|/lib/dracut/hooks/initqueue/*.sh
ConditionPathExistsGlob=|/lib/dracut/hooks/initqueue/settled/*.sh ConditionPathExistsGlob=|/lib/dracut/hooks/initqueue/settled/*.sh

View File

@ -12,7 +12,7 @@ Description=dracut mount hook
Documentation=man:dracut-mount.service(8) Documentation=man:dracut-mount.service(8)
After=initrd-root-fs.target initrd-parse-etc.service After=initrd-root-fs.target initrd-parse-etc.service
After=dracut-initqueue.service dracut-pre-mount.service After=dracut-initqueue.service dracut-pre-mount.service
ConditionPathExists=/etc/initrd-release ConditionPathExists=/usr/lib/initrd-release
ConditionDirectoryNotEmpty=|/lib/dracut/hooks/mount ConditionDirectoryNotEmpty=|/lib/dracut/hooks/mount
ConditionKernelCommandLine=|rd.break=mount ConditionKernelCommandLine=|rd.break=mount



View File

@ -14,7 +14,7 @@ DefaultDependencies=no
Before=initrd-root-fs.target sysroot.mount Before=initrd-root-fs.target sysroot.mount
After=dracut-initqueue.service After=dracut-initqueue.service
After=cryptsetup.target After=cryptsetup.target
ConditionPathExists=/etc/initrd-release ConditionPathExists=/usr/lib/initrd-release
ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-mount ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-mount
ConditionKernelCommandLine=|rd.break=pre-mount ConditionKernelCommandLine=|rd.break=pre-mount



View File

@ -15,7 +15,7 @@ After=dracut-initqueue.service dracut-pre-mount.service dracut-mount.service
Before=initrd-cleanup.service Before=initrd-cleanup.service
Wants=remote-fs.target Wants=remote-fs.target
After=remote-fs.target After=remote-fs.target
ConditionPathExists=/etc/initrd-release ConditionPathExists=/usr/lib/initrd-release
ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-pivot ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-pivot
ConditionDirectoryNotEmpty=|/lib/dracut/hooks/cleanup ConditionDirectoryNotEmpty=|/lib/dracut/hooks/cleanup
ConditionKernelCommandLine=|rd.break=pre-pivot ConditionKernelCommandLine=|rd.break=pre-pivot

View File

@ -14,7 +14,7 @@ DefaultDependencies=no
Before=systemd-udev-trigger.service dracut-initqueue.service Before=systemd-udev-trigger.service dracut-initqueue.service
After=dracut-pre-udev.service systemd-udevd.service systemd-tmpfiles-setup-dev.service After=dracut-pre-udev.service systemd-udevd.service systemd-tmpfiles-setup-dev.service
Wants=dracut-pre-udev.service systemd-udevd.service Wants=dracut-pre-udev.service systemd-udevd.service
ConditionPathExists=/etc/initrd-release ConditionPathExists=/usr/lib/initrd-release
ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-trigger ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-trigger
ConditionKernelCommandLine=|rd.break=pre-trigger ConditionKernelCommandLine=|rd.break=pre-trigger



View File

@ -14,7 +14,7 @@ DefaultDependencies=no
Before=systemd-udevd.service dracut-pre-trigger.service Before=systemd-udevd.service dracut-pre-trigger.service
After=dracut-cmdline.service After=dracut-cmdline.service
Wants=dracut-cmdline.service Wants=dracut-cmdline.service
ConditionPathExists=/etc/initrd-release ConditionPathExists=/usr/lib/initrd-release
ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-udev ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-udev
ConditionKernelCommandLine=|rd.break=pre-udev ConditionKernelCommandLine=|rd.break=pre-udev
ConditionKernelCommandLine=|rd.driver.blacklist ConditionKernelCommandLine=|rd.driver.blacklist

View File

@ -6,4 +6,4 @@ After=basic.target rescue.service rescue.target
AllowIsolate=yes AllowIsolate=yes
OnFailure=emergency.target OnFailure=emergency.target
OnFailureIsolate=yes OnFailureIsolate=yes
ConditionPathExists=/etc/initrd-release ConditionPathExists=/usr/lib/initrd-release

View File

@ -393,7 +393,7 @@ splitsep() {
} }


setdebug() { setdebug() {
[ -f /etc/initrd-release ] || return [ -f /usr/lib/initrd-release ] || return
if [ -z "$RD_DEBUG" ]; then if [ -z "$RD_DEBUG" ]; then
if [ -e /proc/cmdline ]; then if [ -e /proc/cmdline ]; then
RD_DEBUG=no RD_DEBUG=no

View File

@ -106,7 +106,7 @@ else
exec 0<>/dev/console 1<>/dev/console 2<>/dev/console exec 0<>/dev/console 1<>/dev/console 2<>/dev/console
fi fi


[ -f /etc/initrd-release ] && . /etc/initrd-release [ -f /usr/lib/initrd-release ] && . /usr/lib/initrd-release
[ -n "$VERSION_ID" ] && info "$NAME-$VERSION_ID" [ -n "$VERSION_ID" ] && info "$NAME-$VERSION_ID"


source_conf /etc/conf.d source_conf /etc/conf.d

View File

@ -88,8 +88,10 @@ install() {
echo VERSION_ID=$VERSION_ID echo VERSION_ID=$VERSION_ID
echo PRETTY_NAME=\"$PRETTY_NAME\" echo PRETTY_NAME=\"$PRETTY_NAME\"
echo ANSI_COLOR=\"$ANSI_COLOR\" echo ANSI_COLOR=\"$ANSI_COLOR\"
} > $initdir/etc/initrd-release } > $initdir/usr/lib/initrd-release
echo dracut-$DRACUT_VERSION > $initdir/lib/dracut/dracut-$DRACUT_VERSION echo dracut-$DRACUT_VERSION > $initdir/lib/dracut/dracut-$DRACUT_VERSION
ln -sf ../usr/lib/initrd-release $initdir/etc/initrd-release
ln -sf initrd-release $initdir/usr/lib/os-release
ln -sf initrd-release $initdir/etc/os-release ln -sf initrd-release $initdir/etc/os-release


## save host_devs which we need bring up ## save host_devs which we need bring up