rpms/dracut/F-12 dracut-git8d0a55cfac2b7dc2b3ce71235dce40fef17e9953.patch, NONE, 1.1 dracut-gitac36d5db7e85ff2861b62ab7212655d49eee1b42.patch, NONE, 1.1 dracut-gitcdc74b198ebbda69f550a7d744534e41cffd7e25.patch, NONE, 1.1 dracut.spec, 1.38, 1.39

Harald Hoyer harald at fedoraproject.org
Wed Oct 7 14:15:42 UTC 2009


Author: harald

Update of /cvs/pkgs/rpms/dracut/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv32626

Modified Files:
	dracut.spec 
Added Files:
	dracut-git8d0a55cfac2b7dc2b3ce71235dce40fef17e9953.patch 
	dracut-gitac36d5db7e85ff2861b62ab7212655d49eee1b42.patch 
	dracut-gitcdc74b198ebbda69f550a7d744534e41cffd7e25.patch 
Log Message:
* Wed Oct 07 2009 Harald Hoyer <harald at redhat.com> 002-13
- fixed init=<command> handling
- kill loginit if "rdinitdebug" specified
- run dmsquash-live-root after udev has settled (bug #527514)


dracut-git8d0a55cfac2b7dc2b3ce71235dce40fef17e9953.patch:
 init |    1 +
 1 file changed, 1 insertion(+)

--- NEW FILE dracut-git8d0a55cfac2b7dc2b3ce71235dce40fef17e9953.patch ---
commit 8d0a55cfac2b7dc2b3ce71235dce40fef17e9953
Author: Harald Hoyer <harald at redhat.com>
Date:   Wed Oct 7 12:48:47 2009 +0200

    do not use init= arg as first argument

diff --git a/modules.d/99base/init b/modules.d/99base/init
index 54d35cc..a5b565c 100755
--- a/modules.d/99base/init
+++ b/modules.d/99base/init
@@ -227,6 +227,7 @@ if getarg init= >/dev/null ; then
     read CLINE </proc/cmdline
     CLINE=${CLINE#*init=}
     set $CLINE
+    shift
     for x in "$@"; do
         for s in $ignoreargs; do       
             [ "${x%%=*}" = $s ] && continue 2

dracut-gitac36d5db7e85ff2861b62ab7212655d49eee1b42.patch:
 init |   42 ++++++++++++++++++++++++++++++++++--------
 1 file changed, 34 insertions(+), 8 deletions(-)

--- NEW FILE dracut-gitac36d5db7e85ff2861b62ab7212655d49eee1b42.patch ---
commit ac36d5db7e85ff2861b62ab7212655d49eee1b42
Author: Harald Hoyer <harald at redhat.com>
Date:   Wed Oct 7 14:03:19 2009 +0200

    base/init: kill loginit after one second of waiting

diff --git a/modules.d/99base/init b/modules.d/99base/init
index a5b565c..24832ab 100755
--- a/modules.d/99base/init
+++ b/modules.d/99base/init
@@ -2,15 +2,40 @@
 #
 # Licensed under the GPLv2
 #
-# Copyright 2008, Red Hat, Inc.
+# Copyright 2008-2009, Red Hat, Inc.
+# Harald Hoyer <harald at redhat.com>
 # Jeremy Katz <katzj at redhat.com>
 
+wait_for_loginit()
+{
+    if getarg rdinitdebug; then
+	set +x
+	exec 1>- 2>-
+	exec 0<>/dev/console 1<>/dev/console 2<>/dev/console
+	# wait for loginit
+	i=0
+	while [ $i -lt 10 ]; do 
+	    j=$(jobs)
+	    [ -z "$j" ] && break
+	    [ -z "${j##*Running*}" ] || break
+	    sleep 0.1
+	    i=$[$i+1]
+	done	
+	[ $i -eq 10 ] && kill %1 >/dev/null 2>&1
+
+        while pidof -x /sbin/loginit >/dev/null 2>&1; do
+            for pid in $(pidof -x /sbin/loginit); do
+                kill $HARD $pid >/dev/null 2>&1
+            done
+            HARD="-9"
+        done
+	set -x
+    fi
+}
+
 emergency_shell()
 {
-    set +x
-    exec 0<>/dev/console 1<>/dev/console 2<>/dev/console
-    # wait for loginit
-    wait
+    wait_for_loginit
     echo ; echo
     echo $@
     source_all emergency
@@ -58,7 +83,10 @@ if getarg rdinitdebug; then
     mkfifo /dev/initlog.pipe
     /sbin/loginit $DRACUT_QUIET </dev/initlog.pipe >/dev/console 2>&1 &
     exec >/dev/initlog.pipe 2>&1
+else
+    exec 0<>/dev/console 1<>/dev/console 2<>/dev/console
 fi
+
 setdebug
 
 mkdir /dev/shm
@@ -245,9 +273,7 @@ fi
 
 info "Switching root"
 
-exec 0<>/dev/console 1<>/dev/console 2<>/dev/console
-# wait for loginit
-wait
+wait_for_loginit
 
 exec switch_root "$NEWROOT" "$INIT" $initargs || {
     echo "Something went very badly wrong in the initramfs.  Please "

dracut-gitcdc74b198ebbda69f550a7d744534e41cffd7e25.patch:
 dmsquash-live-genrules.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- NEW FILE dracut-gitcdc74b198ebbda69f550a7d744534e41cffd7e25.patch ---
commit cdc74b198ebbda69f550a7d744534e41cffd7e25
Author: Harald Hoyer <harald at redhat.com>
Date:   Wed Oct 7 12:49:52 2009 +0200

    dmsquash-live: run dmsquash-live-root after udev settle

diff --git a/modules.d/90dmsquash-live/dmsquash-live-genrules.sh b/modules.d/90dmsquash-live/dmsquash-live-genrules.sh
index 0cd7e8d..56199d5 100644
--- a/modules.d/90dmsquash-live/dmsquash-live-genrules.sh
+++ b/modules.d/90dmsquash-live/dmsquash-live-genrules.sh
@@ -4,9 +4,9 @@ if [ "${root%%:*}" = "live" ]; then
     	${root#live:/dev/} 
     printf 'SYMLINK=="%s", SYMLINK+="live"\n' \
 	${root#live:/dev/} 
-    printf 'KERNEL=="%s", RUN+="/sbin/initqueue --onetime --unique /sbin/dmsquash-live-root $env{DEVNAME}"\n' \
+    printf 'KERNEL=="%s", RUN+="/sbin/initqueue --settled --onetime --unique /sbin/dmsquash-live-root $env{DEVNAME}"\n' \
     	${root#live:/dev/} 
-    printf 'SYMLINK=="%s", RUN+="/sbin/initqueue --onetime --unique /sbin/dmsquash-live-root $env{DEVNAME}"\n' \
+    printf 'SYMLINK=="%s", RUN+="/sbin/initqueue --settled --onetime --unique /sbin/dmsquash-live-root $env{DEVNAME}"\n' \
 	${root#live:/dev/} 
 
     ) >> /etc/udev/rules.d/99-live-mount.rules


Index: dracut.spec
===================================================================
RCS file: /cvs/pkgs/rpms/dracut/F-12/dracut.spec,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -p -r1.38 -r1.39
--- dracut.spec	6 Oct 2009 12:52:01 -0000	1.38
+++ dracut.spec	7 Oct 2009 14:15:42 -0000	1.39
@@ -14,12 +14,17 @@
 
 Name: dracut
 Version: 002
-Release: 12%{?rdist}
+Release: 13%{?rdist}
 Summary: Initramfs generator using udev
 Group: System Environment/Base		
 License: GPLv2+	
 URL: http://apps.sourceforge.net/trac/dracut/wiki
 Source0: dracut-%{version}%{?dashgittag}.tar.bz2
+
+Patch1: dracut-git8d0a55cfac2b7dc2b3ce71235dce40fef17e9953.patch
+Patch2: dracut-gitcdc74b198ebbda69f550a7d744534e41cffd7e25.patch
+Patch3: dracut-gitac36d5db7e85ff2861b62ab7212655d49eee1b42.patch
+
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Requires: udev
 Requires: util-linux-ng
@@ -103,6 +108,9 @@ This package contains tools to assemble 
 
 %prep
 %setup -q -n %{name}-%{version}%{?dashgittag}
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
 
 %build
 make
@@ -184,6 +192,11 @@ rm -rf $RPM_BUILD_ROOT
 %dir /var/lib/dracut/overlay
 
 %changelog
+* Wed Oct 07 2009 Harald Hoyer <harald at redhat.com> 002-13
+- fixed init=<command> handling
+- kill loginit if "rdinitdebug" specified
+- run dmsquash-live-root after udev has settled (bug #527514)
+
 * Tue Oct 06 2009 Harald Hoyer <harald at redhat.com> 002-12
 - add missing loginit helper
 - corrected dracut manpage




More information about the scm-commits mailing list