diff options
author | maximilian attems <maks@debian.org> | 2006-08-25 17:04:33 +0200 |
---|---|---|
committer | maximilian attems <maks@debian.org> | 2006-08-25 17:04:33 +0200 |
commit | 45989c9f37db0ef23e984ea559f2da784a028366 (patch) | |
tree | 7412695c5971e3bf874ee972e06032edb038de39 /mkinitramfs | |
parent | fabe918dee7da26d177d67d4aa8fe3fd6e83e513 (diff) | |
download | initramfs-tools-45989c9f37db0ef23e984ea559f2da784a028366.tar.gz initramfs-tools-45989c9f37db0ef23e984ea559f2da784a028366.zip |
- fix bashism
- rename mdadm.conf in mdrun.conf
- retry nfsmount
- harden init
- fix lvm boot script prereqs
Diffstat (limited to 'mkinitramfs')
-rwxr-xr-x | mkinitramfs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/mkinitramfs b/mkinitramfs index 759d6cb..d088efa 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -236,10 +236,10 @@ run_scripts /usr/share/initramfs-tools/hooks run_scripts "${CONFDIR}"/hooks # FIXME: Remove this Raid block after Etch releases -if [ -x /sbin/mdadm -a ! -f /usr/share/initramfs-tools/hooks/mdadm ]; then +if [ -x /sbin/mdadm ] && [ ! -f /usr/share/initramfs-tools/hooks/mdadm ]; then # use mkinitrd magic for Sarge backwards compat rootraiddev="$(df / | sed -rne 's,^(/dev/[^[:space:]]+).*,\1,p')" - echo "rootraiddev=${rootraiddev}" > /conf/mdadm.conf + echo "rootraiddev=${rootraiddev}" > /conf/mdrun.conf mdadm=$(mdadm --detail "${rootraiddev}") echo "${mdadm}" | awk ' $1 == "Number" && $2 == "Major" { start = 1; next } @@ -248,16 +248,17 @@ if [ -x /sbin/mdadm -a ! -f /usr/share/initramfs-tools/hooks/mdadm ]; then $2 == 0 && $3 == 0 { next } { devices = devices " " $NF } END { print "devices='\''" devices "'\''" }' \ - >> /conf/mdadm.conf + >> /conf/mdrun.conf copy_exec /sbin/mdadm /sbin - copy_exec /sbin/mdrun /sbin for x in md linear multipath raid0 raid1 raid456 raid5 raid6 raid10; do manual_add_modules ${x} done fi +[ -x /sbin/mdrun ] && copy_exec /sbin/mdrun /sbin # FIXME: Remove this LVM block after Etch releases -if [ -x /sbin/vgchange -a -d /lib/lvm-200 -a ! -f /usr/share/initramfs-tools/hooks/lvm2 ]; then +if [ -x /sbin/vgchange ] && [ -d /lib/lvm-200 ] \ + && [ ! -f /usr/share/initramfs-tools/hooks/lvm2 ]; then copy_exec /lib/lvm-200/vgchange /sbin for x in dm_mod dm_snapshot dm_mirror; do manual_add_modules ${x} |