From: Harald Hoyer Date: Mon, 23 Mar 2009 14:28:14 +0000 (+0100) Subject: Merge branch 'enhanced-test-framework' of git://fnordovax.org/dracut into test X-Git-Tag: 0.1~282^2~12 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=47f151f762511b45dd902a240c3106bbd1226060;p=thirdparty%2Fdracut.git Merge branch 'enhanced-test-framework' of git://fnordovax.org/dracut into test Conflicts: modules.d/50plymouth/63-luks.rules modules.d/50plymouth/cryptroot.sh modules.d/50plymouth/install modules.d/90crypt/63-luks.rules modules.d/90crypt/cryptroot.sh modules.d/90crypt/install --- 47f151f762511b45dd902a240c3106bbd1226060 diff --cc modules.d/90crypt/install index f733c2acd,250139c4b..fff2dce48 --- a/modules.d/90crypt/install +++ b/modules.d/90crypt/install @@@ -1,5 -1,5 +1,5 @@@ #!/bin/bash inst cryptsetup + instmods dm_crypt cbc aes sha256 inst_rules "$moddir/63-luks.rules" -inst "$moddir/cryptroot.sh" "/bin/cryptroot.sh" +inst "$moddir"/cryptroot-ask.sh /lib/udev/cryptroot-ask - diff --cc modules.d/99base/init index 39dd21aa1,2cf2f148e..b081a9339 --- a/modules.d/99base/init +++ b/modules.d/99base/init @@@ -28,11 -28,8 +28,10 @@@ source_all() for f in "/$1"/*.sh; do [ -f "$f" ] && . "$f"; done } - echo "Starting initrd..." export PATH=/sbin:/bin:/usr/sbin:/usr/bin export TERM=linux +NEWROOT="/sysroot" + trap "emergency_shell" 0 mknod /dev/null c 1 3 @@@ -107,21 -66,20 +106,25 @@@ getarg 'break=mount' && emergency_shel # be sourced any number of times. As soon as one suceeds, no more are sourced. i=0 while :; do + [ -d "$NEWROOT/proc" ] && break; + for f in /mount/*.sh; do - [ -x "$f" ] && . "$f"; - [ "$ROOTFS_MOUNTED" ] && break; + [ -x "$f" ] && . "$f"; + [ "$ROOTFS_MOUNTED" ] && break; done - [ "$ROOTFS_MOUNTED" ] && break; + sleep 1 i=$(($i+1)) - [ $i -gt 10 ] && emergency_shell + ( + flock -s 200 + [ $i -gt 10 ] && emergency_shell + ) 200>/.console_lock done + # pre pivot scripts are sourced just before we switch over to the new root. + getarg 'break=pre-pivot' && emergency_shell + source_all pre-pivot + # by the time we get here, the root filesystem should be mounted. # Try to find init. for i in "$(getarg init=)" /sbin/init /etc/init /init /bin/sh; do