From d387bfe7d8745e0abadd9bff97e05d3c3de2eda1 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mar 31 2011 15:41:17 +0000 Subject: - fixed PATH and kmsg logging --- diff --git a/0019-base-dracut-lib.sh-changed-kmgs-log-levels.patch b/0019-base-dracut-lib.sh-changed-kmgs-log-levels.patch new file mode 100644 index 0000000..3e20aaf --- /dev/null +++ b/0019-base-dracut-lib.sh-changed-kmgs-log-levels.patch @@ -0,0 +1,43 @@ +From 79471f365e5f276ac5463404fbe739ddb2e12465 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 31 Mar 2011 13:12:38 +0200 +Subject: [PATCH] base/dracut-lib.sh: changed kmgs log levels + +New kernel/dmesg understands syslog levels, so we log with "+24" to indicate +that dracut is a daemon (current init). +--- + modules.d/99base/dracut-lib.sh | 8 ++++---- + 1 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index 37b3e76..930138a 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -236,8 +236,8 @@ source_conf() { + + die() { + { +- echo "<1>dracut: FATAL: $@"; +- echo "<1>dracut: Refusing to continue"; ++ echo "<24>dracut: FATAL: $@"; ++ echo "<24>dracut: Refusing to continue"; + } > /dev/kmsg + + { +@@ -260,14 +260,14 @@ check_quiet() { + + warn() { + check_quiet +- echo "<4>dracut Warning: $@" > /dev/kmsg ++ echo "<28>dracut Warning: $@" > /dev/kmsg + [ "$DRACUT_QUIET" != "yes" ] && \ + echo "dracut Warning: $@" >&2 + } + + info() { + check_quiet +- echo "<6>dracut: $@" > /dev/kmsg ++ echo "<30>dracut: $@" > /dev/kmsg + [ "$DRACUT_QUIET" != "yes" ] && \ + echo "dracut: $@" + } diff --git a/0020-base-init-reset-PATH-after-the-run-move.patch b/0020-base-init-reset-PATH-after-the-run-move.patch new file mode 100644 index 0000000..3511dea --- /dev/null +++ b/0020-base-init-reset-PATH-after-the-run-move.patch @@ -0,0 +1,30 @@ +From 985377435120ce2b2ba48c9236f3f788a5db822a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 31 Mar 2011 14:10:22 +0200 +Subject: [PATCH] base/init: reset PATH after the /run move + +--- + modules.d/99base/init | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/modules.d/99base/init b/modules.d/99base/init +index 83d9568..0f18b44 100755 +--- a/modules.d/99base/init ++++ b/modules.d/99base/init +@@ -373,7 +373,6 @@ info "Switching root" + + wait_for_loginit + +-export PATH="$OLD_PATH" + + if [ -d "$NEWROOT"/run ]; then + mount --move /run "$NEWROOT"/run +@@ -388,6 +387,8 @@ else + umount -l /run + fi + ++export PATH="$OLD_PATH" ++ + if [ -f /etc/capsdrop ]; then + . /etc/capsdrop + info "Calling $INIT with capabilities $CAPS_INIT_DROP dropped." diff --git a/dracut.spec b/dracut.spec index 1435afe..b56240a 100644 --- a/dracut.spec +++ b/dracut.spec @@ -8,7 +8,7 @@ Name: dracut Version: 009 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Initramfs generator using udev %if 0%{?fedora} @@ -36,6 +36,8 @@ Patch15: 0015-base-init-fixed-compat-dev-.initramfs-copy.patch Patch16: 0016-fips-fixed-boot-dev-handling.patch Patch17: 0017-plymouth-use-run-plymouth-pid-instead-of-run-initram.patch Patch18: 0018-dmsquash-live-dmsquash-live-genrules.sh-fixed-udev-r.patch +Patch19: 0019-base-dracut-lib.sh-changed-kmgs-log-levels.patch +Patch20: 0020-base-init-reset-PATH-after-the-run-move.patch BuildArch: noarch @@ -185,6 +187,8 @@ This package contains tools to assemble the local initrd and host configuration. %patch16 -p1 %patch17 -p1 %patch18 -p1 +%patch19 -p1 +%patch20 -p1 %build make WITH_SWITCH_ROOT=0%{?with_switch_root} @@ -321,6 +325,9 @@ rm -rf $RPM_BUILD_ROOT %dir /var/lib/dracut/overlay %changelog +* Thu Mar 31 2011 Harald Hoyer 009-5 +- fixed PATH and kmsg logging + * Thu Mar 31 2011 Harald Hoyer 009-4 - fixed dmsquash rule generation - fixed fips boot arg parsing