- fixed PATH and kmsg logging

This commit is contained in:
Harald Hoyer 2011-03-31 17:41:17 +02:00
parent a0a8881c5b
commit d387bfe7d8
3 changed files with 81 additions and 1 deletions

View File

@ -0,0 +1,43 @@
From 79471f365e5f276ac5463404fbe739ddb2e12465 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
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: $@"
}

View File

@ -0,0 +1,30 @@
From 985377435120ce2b2ba48c9236f3f788a5db822a Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
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."

View File

@ -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 <harald@redhat.com> 009-5
- fixed PATH and kmsg logging
* Thu Mar 31 2011 Harald Hoyer <harald@redhat.com> 009-4
- fixed dmsquash rule generation
- fixed fips boot arg parsing