# HG changeset patch # User Pascal Bellard # Date 1253047664 -7200 # Node ID 560336a3b8d8e7a896430a878025adcb801e6f7d # Parent 939e9b93ed08f36d8d2c296af2fbc7aa7a258e44 slitaz-loram-cdrom: add usb delay diff -r 939e9b93ed08 -r 560336a3b8d8 slitaz-loram-cdrom/receipt --- a/slitaz-loram-cdrom/receipt Tue Sep 15 18:46:39 2009 +0200 +++ b/slitaz-loram-cdrom/receipt Tue Sep 15 22:47:44 2009 +0200 @@ -25,11 +25,11 @@ i=$(($i-1)) tag=$(grep "$tag" $1/etc/init.d/rcS) if [ "$2" = "-R" ]; then - line="-$(($i-61)),63 +$(($i-61)),2" + line="-$(($i-72)),74 +$(($i-72)),2" i="-" else grep -q 'from slitaz-loram-cdrom package' $1/etc/init.d/rcS && return - line="-$i,2 +$i,63" + line="-$i,2 +$i,74" i="+" fi patch -p0 < /dev/null ; then +$i if ! /bin/mount -r \$DEVICE /cdrom; then +$i if echo \$DEVICE | grep -Eq "/dev/sd|UUID=|LABEL="; then +$i USBDELAY=\`cat /sys/module/usb_storage/parameters/delay_use\` +$i USBDELAY=\$((1+\$USBDELAY)) +$i echo "\$DEVICE is potentially a USB device: sleep for \$USBDELAY seconds" +$i sleep \$USBDELAY +$i fi +$i if ! /bin/mount -r \$DEVICE /cdrom; then +$i DEVICE="" +$i fi +$i fi +$i if [ -n "\$DEVICE" ]; then $i if [ -d /.usr.rw ]; then $i echo -n "Mounting /usr read-write... " $i usr=.usr.ro