summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaximilian attems <maks@debian.org>2006-03-26 22:37:51 +0200
committermaximilian attems <maks@debian.org>2006-03-26 22:37:51 +0200
commitfac756fddb6da3efbbfe99c3c9b0644346ecc695 (patch)
tree3910cbeb5566ab766aeb50a4eb4ac9d3067cbb46
parent4b5cc6ce7567a7075802dd8c3e47dd7cf8e84627 (diff)
downloadinitramfs-tools-fac756fddb6da3efbbfe99c3c9b0644346ecc695.tar.gz
initramfs-tools-fac756fddb6da3efbbfe99c3c9b0644346ecc695.zip
Resynch with 0.40ubuntu28
add raid10 module move the loop waiting code to mountroot() leaves only ide-generic from scripts/local-top/udev_helper md pre-requesites the udev one
-rw-r--r--debian/changelog12
-rwxr-xr-xhooks/md2
-rwxr-xr-xscripts/init-premount/udev_helper107
-rw-r--r--scripts/local26
-rwxr-xr-xscripts/local-top/md2
-rwxr-xr-xscripts/local-top/udev_helper23
6 files changed, 61 insertions, 111 deletions
diff --git a/debian/changelog b/debian/changelog
index a2e8cef..93b55c4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,7 +2,17 @@ initramfs-tools (0.59) unstable; urgency=low
* debian/copyright: Add years of copyright and authors.
- -- maximilian attems <maks@sternwelten.at> Sun, 26 Mar 2006 21:04:28 +0200
+ * Resync with 0.40ubuntu28:
+ - hooks/md: Add raid10 module.
+ - scripts/local: Move the "loop waiting for the root filesystem" code from
+ the udev premount script to the local mountroot() function where it truly
+ belongs.
+ - scripts/local-top/udev_helper: Leave the remaining ide-generic part
+ there, should be taken over by udev itself.
+ - make the md local-top scripts pre-requisite the udev one.
+ thanks Scott James Remnant <scott@ubuntu.com>
+
+ -- maximilian attems <maks@sternwelten.at> Sun, 26 Mar 2006 22:35:15 +0200
initramfs-tools (0.58) unstable; urgency=low
diff --git a/hooks/md b/hooks/md
index c020c3a..becaba1 100755
--- a/hooks/md
+++ b/hooks/md
@@ -23,6 +23,6 @@ fi
copy_exec /sbin/mdadm /sbin
copy_exec /sbin/mdrun /sbin
-for x in md linear raid0 raid1 raid5 raid6; do
+for x in md linear raid0 raid1 raid5 raid6 raid10; do
manual_add_modules ${x}
done
diff --git a/scripts/init-premount/udev_helper b/scripts/init-premount/udev_helper
deleted file mode 100755
index d2ef579..0000000
--- a/scripts/init-premount/udev_helper
+++ /dev/null
@@ -1,107 +0,0 @@
-#!/bin/sh
-
-PREREQ="udev"
-
-prereqs()
-{
- echo "$PREREQ"
-}
-
-case $1 in
-# get pre-requisites
-prereqs)
- prereqs
- exit 0
- ;;
-esac
-
-# Source the relevant scripts for later decisions
-. /conf/initramfs.conf
-. /scripts/functions
-
-# Nothing todo for nfs boot
-case "${BOOT}" in
-local)
- ;;
-*)
- exit 0
- ;;
-esac
-
-# Our job now is to make the block device for the root filesystem available.
-# This is actually a bit trickier than it first appears because we first need
-# to figure out which driver needs it, and to do that, we need to know what
-# type of bus it's on. Fortunately we have all that information, this still
-# feels like an ungodly hack though.
-case "${ROOT}" in
-/dev/root)
- # An interesting case, this root device was specified as a
- # major/minor pair. Fortunately we have that information
- case "${major}" in
- 3|22|33|34|56|57|88|89|90|91)
- # traditional ide
- root_type=ide
- ;;
- 80|81|82|83|84|85|86|87)
- # ide on i2o
- root_type=ide
- ;;
- 8|11|65|66|67|68|69|70|71|128|129|130|131|132|133|134|135)
- # scsi
- root_type=scsi
- ;;
- esac
- ;;
-/dev/hd*)
- # Ahh, plain-old traditional ide
- root_type=ide
- ;;
-/dev/sd*)
- # SCSI, or an IDE controller dressed up in drag
- root_type=scsi
- ;;
-/dev/disk/*)
- # Specified by label; sadly there's no way to tell what bus
- # this is on, so we'll just declare that we only support it
- # for SCSI and removable devices
- root_type=scsi
- ;;
-esac
-
-case "${root_type}" in
-ide)
- # If we're booting from IDE, it might not be a PCI controller,
- # but might be an old fashioned ISA controller; in which case
- # we need to load ide-generic.
- if [ ! -e "${ROOT}" -o "${ROOT}" = "/dev/root" ]; then
- modprobe -q ide-generic
- fi
- ;;
-
-scsi)
- # If we're booting from SCSI we should have done all we need,
- # now it's just a matter of waiting for the devices to appear
- # which could take a while...
- [ -e "${ROOT}" ] || log_begin_msg "Waiting for root file system"
-
- if type usplash_write >/dev/null 2>&1; then
- usplash_write "TIMEOUT 30" || true
- fi
-
- slumber=300
- while [ ${slumber} -gt 0 -a ! -e "${ROOT}" ]; do
- /bin/sleep 0.1
- slumber=$(( ${slumber} - 1 ))
- done
-
- if type usplash_write >/dev/null 2>&1; then
- usplash_write "TIMEOUT 15" || true
- fi
-
- if [ ${slumber} -gt 0 ]; then
- log_end_msg 0
- else
- log_end_msg 1 || true
- fi
- ;;
-esac
diff --git a/scripts/local b/scripts/local
index 917528a..dd5924d 100644
--- a/scripts/local
+++ b/scripts/local
@@ -7,7 +7,31 @@ mountroot ()
run_scripts /scripts/local-top
[ "$quiet" != "y" ] && log_end_msg
- # Get the root filesystem type
+ # If the root device hasn't shown up yet, give it a little while
+ # to deal with removable devices
+ if [ ! -e "${ROOT}" ]; then
+ log_begin_msg "Waiting for root file system..."
+ if [ -x /sbin/usplash_write ]; then
+ /sbin/usplash_write "TIMEOUT 180" || true
+ fi
+
+ slumber=1800
+ while [ ${slumber} -gt 0 -a ! -e "${ROOT}" ]; do
+ /bin/sleep 0.1
+ slumber=$(( ${slumber} - 1 ))
+ done
+
+ if [ ${slumber} -gt 0 ]; then
+ log_end_msg 0
+ else
+ log_end_msg 1 || true
+ fi
+ if [ -x /sbin/usplash_write ]; then
+ /sbin/usplash_write "TIMEOUT 15" || true
+ fi
+ fi
+
+ # We've given up, but we'll let the user fix matters if they can
while [ ! -e "${ROOT}" ]; do
panic "ALERT! ${ROOT} does not exist. Dropping to a shell!"
done
diff --git a/scripts/local-top/md b/scripts/local-top/md
index c7515fe..aa48474 100755
--- a/scripts/local-top/md
+++ b/scripts/local-top/md
@@ -1,6 +1,6 @@
#!/bin/sh
-PREREQ=""
+PREREQ="udev_helper"
prereqs()
{
diff --git a/scripts/local-top/udev_helper b/scripts/local-top/udev_helper
new file mode 100755
index 0000000..5a747ba
--- /dev/null
+++ b/scripts/local-top/udev_helper
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+PREREQ=""
+
+prereqs()
+{
+ echo "$PREREQ"
+}
+
+case $1 in
+# get pre-requisites
+prereqs)
+ prereqs
+ exit 0
+ ;;
+esac
+
+# If we're booting from IDE, it might not be a PCI controller,
+# but might be an old fashioned ISA controller; in which case
+# we need to load ide-generic.
+if [ ! -e "${ROOT}" -o "${ROOT}" = "/dev/root" ]; then
+ modprobe -q ide-generic
+fi