wok-6.x diff slitaz-loram-cdrom/receipt @ rev 309
Slitaz-loram*: update patch according to /etc/init.d/rcS
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Mar 01 12:55:33 2008 +0000 (2008-03-01) |
parents | 39ab194bbbef |
children | fc9f573e8ac8 |
line diff
1.1 --- a/slitaz-loram-cdrom/receipt Fri Feb 22 14:36:45 2008 +0100 1.2 +++ b/slitaz-loram-cdrom/receipt Sat Mar 01 12:55:33 2008 +0000 1.3 @@ -10,37 +10,7 @@ 1.4 genpkg_rules() 1.5 { 1.6 mkdir -p $fs/etc/tazlito 1.7 - cat > $fs/etc/tazlito/loram.rootfs << EOF 1.8 -echo "\$(du -hs /usr | cut -f1) were used by /usr" 1.9 -for ii in /sbin /lib /bin; do 1.10 - mkdir -p ./usr/.moved\$ii 1.11 - for j in e2fsprogs pcmciautils cpio syslinux-extra isapnptools ncurses; do 1.12 - for k in \$(grep ^\$ii /var/lib/tazpkg/installed/\$j/files.list) ; do 1.13 - [ -f .\$k ] || continue 1.14 - mv .\$k ./usr/.moved\$k 1.15 - ln -s /usr/.moved\$k .\$k 1.16 - done 1.17 - done 1.18 -done 1.19 -for ii in /var/lib/tazpkg/installed ; do 1.20 - j=\$(dirname /usr/.moved\$ii) 1.21 - mkdir -p .\$j 1.22 - mv .\$ii .\$j 1.23 - ln -s /usr/.moved\$ii .\$ii 1.24 -done 1.25 -echo "\$(du -hs /usr/.moved | cut -f1) have been moved into /usr" 1.26 -if [ -x usr/sbin/mksquashfs ]; then 1.27 - usr/sbin/mksquashfs usr ../rootcd/usr.sqfs 1.28 - rm -rf usr 1.29 - mkdir usr 1.30 -else 1.31 - mv usr ../rootcd 1.32 - ln -s /cdrom/usr usr 1.33 - ln -s /bin ../rootcd/bin 1.34 -fi 1.35 -mkdir cdrom 1.36 -COMPRESSION="gzip" 1.37 -EOF 1.38 + cp stuff/loram.rootfs $fs/etc/tazlito 1.39 } 1.40 1.41 get_patch() 1.42 @@ -48,26 +18,36 @@ 1.43 cat <<EOF 1.44 --- /etc/init.d/rcS 1.45 +++ /etc/init.d/rcS 1.46 -@@ -54,4 +54,4 @@ 1.47 +@@ -53,4 +53,4 @@ 1.48 + /bin/dmesg > /var/log/dmesg.log 1.49 +-/usr/bin/vcsa2txt < /dev/vcsa1 > /var/log/boot.log 1.50 +-/usr/bin/script -a -q -c '/etc/init.d/rcS logged' /var/log/boot.log 1.51 ++busybox vcsa2txt < /dev/vcsa1 > /var/log/boot.log 1.52 ++busybox script -a -q -c '/etc/init.d/rcS logged' /var/log/boot.log 1.53 + 1.54 +@@ -62,4 +62,4 @@ 1.55 # 1.56 -DRIVE_NAME=`cat /proc/sys/dev/cdrom/info | grep "drive name" | cut -f 3` 1.57 -if [ ! "`readlink /dev/cdrom`" ]; then 1.58 +DRIVE_NAME=`cat /proc/sys/dev/cdrom/info | grep "drive name" | busybox cut -f 3` 1.59 +if [ ! "`busybox readlink /dev/cdrom`" ]; then 1.60 echo -n "Creating symlink : /dev/cdrom..." 1.61 -@@ -69,2 +69,12 @@ 1.62 +@@ -87,2 +87,15 @@ 1.63 1.64 +# Mount /usr 1.65 +if [ -d /cdrom ]; then 1.66 + echo -n "Mounting /usr read-only from /cdrom... " 1.67 -+ /bin/mount -o ro -t iso9660 /dev/cdrom /cdrom 1.68 ++ mount -o ro -t iso9660 /dev/cdrom /cdrom 1.69 + if [ -f /cdrom/usr.sqfs ]; then 1.70 -+ /bin/mount -o loop,ro -t squashfs /cdrom/usr.sqfs /usr 1.71 ++ mount -o loop,ro -t squashfs /cdrom/usr.sqfs /usr 1.72 ++ elif [ ! -L /usr ]; then 1.73 ++ umount /cdrom 1.74 ++ false 1.75 + fi 1.76 + status 1.77 +fi 1.78 + 1.79 - # Handle kernel cmdline parameter modprobe=<module_list> 1.80 + # Handle kernel cmdline parameter config=<device>,<path> to source a 1.81 EOF 1.82 } 1.83 1.84 @@ -87,5 +67,5 @@ 1.85 # Pre remove commands for Tazpkg. 1.86 pre_remove() 1.87 { 1.88 - get_patch | patch -R -p0 1.89 + [ -L /usr/bin/patch ] || get_patch | patch -R -p0 1.90 }