wok-stable rev 3898
slitaz-loram-cdrom: allow frugal install
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Aug 15 10:40:49 2009 +0200 (2009-08-15) |
parents | d09310ff02e5 |
children | 15597e943023 |
files | slitaz-loram-cdrom/receipt |
line diff
1.1 --- a/slitaz-loram-cdrom/receipt Fri Aug 14 23:15:22 2009 +0200 1.2 +++ b/slitaz-loram-cdrom/receipt Sat Aug 15 10:40:49 2009 +0200 1.3 @@ -25,11 +25,11 @@ 1.4 i=$(($i-1)) 1.5 tag=$(grep "$tag" $1/etc/init.d/rcS) 1.6 if [ "$2" = "-R" ]; then 1.7 - line="-$(($i-53)),55 +$(($i-53)),2" 1.8 + line="-$(($i-60)),62 +$(($i-60)),2" 1.9 i="-" 1.10 else 1.11 grep -q 'from slitaz-loram-cdrom package' $1/etc/init.d/rcS && return 1.12 - line="-$i,2 +$i,55" 1.13 + line="-$i,2 +$i,62" 1.14 i="+" 1.15 fi 1.16 patch -p0 <<EOF 1.17 @@ -54,7 +54,14 @@ 1.18 $i 1.19 $i# Mount /usr (from slitaz-loram-cdrom package) 1.20 $i if [ -d /cdrom ]; then 1.21 -$i mount -o ro -t iso9660 /dev/cdrom /cdrom 1.22 +$i DEVICE=/dev/cdrom 1.23 +$i DIR= 1.24 +$i if grep -q " loram=" /proc/cmdline; then 1.25 +$i DIR=\`cat /proc/cmdline | sed 's/.* loram=\([^ ]*\).*/\1/'\` 1.26 +$i DEVICE=\${DIR%,*} 1.27 +$i DIR=/\${DIR#*,} 1.28 +$i fi 1.29 +$i mount -o ro \$DEVICE /cdrom 1.30 $i if [ -d /.usr.rw ]; then 1.31 $i echo -n "Mounting /usr read-write... " 1.32 $i usr=.usr.ro 1.33 @@ -62,16 +69,16 @@ 1.34 $i echo -n "Mounting /usr read-only... " 1.35 $i usr=usr 1.36 $i fi 1.37 -$i FS=/cdrom/usr.cromfs 1.38 +$i FS=/cdrom\$DIR/usr.cromfs 1.39 $i if [ -f \$FS ]; then 1.40 $i release_cdrom 1.41 $i /bin/cromfs-driver \$FS /\$usr -o ro,dev,suid,allow_other 1.42 -$i elif [ -f /cdrom/usr.sqfs ]; then 1.43 -$i FS=/cdrom/usr.sqfs 1.44 +$i elif [ -f /cdrom\$DIR/usr.sqfs ]; then 1.45 +$i FS=/cdrom\$DIR/usr.sqfs 1.46 $i release_cdrom 1.47 $i mount -o loop,ro -t squashfs \$FS /\$usr 1.48 $i elif [ -L /\$usr ]; then 1.49 -$i FS=/cdrom/usr 1.50 +$i FS=/cdrom\$DIR/usr 1.51 $i if release_cdrom; then 1.52 $i rm -f /\$usr 1.53 $i mv \$FS /usr