diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2009-03-27 15:25:32 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-03-27 15:25:32 +0000 |
commit | d9b6e4ec173e167bd89576cfca12b5f7c2dfb620 (patch) | |
tree | 0d672969435e2f3d0c70bba8baf74075dc3b5c8c /initramfs-init | |
parent | 1e3647e71094d59eb05d74641db9cf06e30b77aa (diff) | |
download | abuild-d9b6e4ec173e167bd89576cfca12b5f7c2dfb620.tar.gz abuild-d9b6e4ec173e167bd89576cfca12b5f7c2dfb620.tar.bz2 abuild-d9b6e4ec173e167bd89576cfca12b5f7c2dfb620.tar.xz abuild-d9b6e4ec173e167bd89576cfca12b5f7c2dfb620.zip |
initram: wait for usbdisk to settle
Diffstat (limited to 'initramfs-init')
-rwxr-xr-x | initramfs-init | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/initramfs-init b/initramfs-init index da7a464..6e2c998 100755 --- a/initramfs-init +++ b/initramfs-init @@ -198,6 +198,13 @@ eend 0 mount -t tmpfs tmpfs $NEWROOT # look for apkovl +if dmesg | grep '^usb-storage: waiting' >/dev/null; then + ebegin "Waiting for USB device to settle" + while ! dmesg | grep 'usb-storage: device scan complete' >/dev/null; do + sleep 1 + done + eend 0 +fi for i in usb floppy cdrom; do mount /media/$i 2>/dev/null || continue ovl=$(find_ovl /media/$i) @@ -212,7 +219,7 @@ if [ -f "$ovl" ]; then ebegin "Loading user settings from $ovl" tar -C $NEWROOT -zxf "$ovl" eend $? - umount /media/$i 2>/dev/null + umount /media/$i 2>/dev/null & pkgs=$(sed 's/\#.*//' $NEWROOT/etc/lbu/packages.list 2>/dev/null) fi @@ -255,9 +262,9 @@ cat /proc/mounts | while read DEV DIR TYPE OPTS ; do mount -o move $DIR $NEWROOT/$DIR fi done +ln -sf /.modloop/modules $NEWROOT/lib/modules sync -ln -sf /.modloop/modules $NEWROOT/lib/modules echo "" if [ -x $NEWROOT/sbin/init ]; then exec /bin/busybox switch_root $NEWROOT $chart_init /sbin/init $KOPT_init_args |