dracut/installer: remove cdrom waiting loop that reset some drives.
authorArne Fitzenreiter <arne_f@ipfire.org>
Wed, 12 Jan 2011 13:58:08 +0000 (14:58 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Wed, 12 Jan 2011 13:58:08 +0000 (14:58 +0100)
lfs/dracut
src/patches/dracut-006_remove_cdrom_wait.patch [new file with mode: 0644]

index 726eedb..c9816bd 100644 (file)
@@ -1,7 +1,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2007  Michael Tremer & Christian Schmidt                      #
+# Copyright (C) 2010  IPFire Team  <info@ipfire.org>                          #
 #                                                                             #
 # This program is free software: you can redistribute it and/or modify        #
 # it under the terms of the GNU General Public License as published by        #
@@ -72,6 +72,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
 
        cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/dracut-006_lzma.patch
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/dracut-006_remove_cdrom_wait.patch
 
        cd $(DIR_APP) && cp -vf $(DIR_SRC)/src/dracut/switch_root.c .
 
diff --git a/src/patches/dracut-006_remove_cdrom_wait.patch b/src/patches/dracut-006_remove_cdrom_wait.patch
new file mode 100644 (file)
index 0000000..23c084e
--- /dev/null
@@ -0,0 +1,21 @@
+diff -Naur dracut-006.org/modules.d/99base/init dracut-006/modules.d/99base/init
+--- dracut-006.org/modules.d/99base/init       2010-06-17 10:46:29.000000000 +0200
++++ dracut-006/modules.d/99base/init   2011-01-12 11:40:41.713190125 +0100
+@@ -190,17 +190,6 @@
+     # no more udev jobs and queues empty.
+     sleep 0.5
+-    # dirty hack for some cdrom drives,
+-    # which report no medium for quiet
+-    # some time.
+-    for cdrom in /sys/block/sr*; do
+-      [ -e "$cdrom" ] || continue
+-      # skip, if cdrom medium was already found
+-        strstr "$(udevadm info --query=env --path=${cdrom##/sys})" \
+-          ID_CDROM_MEDIA && continue
+-        echo change > "$cdrom/uevent"        
+-    done
+-    
+     i=$(($i+1))
+     [ $i -gt $RDRETRY ] \
+         && { flock -s 9 ; emergency_shell "No root device found"; } 9>/.console_lock