wok-4.x 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 | e588ccb82a03 |
children | bb5704323e2b |
files | slitaz-loram-cdrom/receipt slitaz-loram-cdrom/stuff/loram.rootfs slitaz-loram/receipt slitaz-loram/stuff/loram.rootfs |
line diff
1.1 --- a/slitaz-loram-cdrom/receipt Sat Mar 01 11:31:53 2008 +0000 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 }
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/slitaz-loram-cdrom/stuff/loram.rootfs Sat Mar 01 12:55:33 2008 +0000 2.3 @@ -0,0 +1,29 @@ 2.4 +echo "$(du -hs /usr | cut -f1) were used by /usr" 2.5 +for ii in /sbin /lib /bin; do 2.6 + mkdir -p ./usr/.moved$ii 2.7 + for j in e2fsprogs pcmciautils cpio syslinux-extra isapnptools ncurses; do 2.8 + for k in $(grep ^$ii /var/lib/tazpkg/installed/$j/files.list) ; do 2.9 + [ -f .$k ] || continue 2.10 + mv .$k ./usr/.moved$k 2.11 + ln -s /usr/.moved$k .$k 2.12 + done 2.13 + done 2.14 +done 2.15 +for ii in /var/lib/tazpkg/installed ; do 2.16 + j=$(dirname /usr/.moved$ii) 2.17 + mkdir -p .$j 2.18 + mv .$ii .$j 2.19 + ln -s /usr/.moved$ii .$ii 2.20 +done 2.21 +echo "$(du -hs /usr/.moved | cut -f1) have been moved into /usr" 2.22 +if [ -x usr/sbin/mksquashfs ]; then 2.23 + usr/sbin/mksquashfs usr ../rootcd/usr.sqfs 2.24 + rm -rf usr 2.25 + mkdir usr 2.26 +else 2.27 + mv usr ../rootcd 2.28 + ln -s /cdrom/usr usr 2.29 + ln -s /bin ../rootcd/bin 2.30 +fi 2.31 +mkdir cdrom 2.32 +COMPRESSION="gzip"
3.1 --- a/slitaz-loram/receipt Sat Mar 01 11:31:53 2008 +0000 3.2 +++ b/slitaz-loram/receipt Sat Mar 01 12:55:33 2008 +0000 3.3 @@ -11,32 +11,7 @@ 3.4 genpkg_rules() 3.5 { 3.6 mkdir -p $fs/etc/tazlito 3.7 - cat > $fs/etc/tazlito/loram.rootfs << EOF 3.8 -echo "\$(du -hs ./usr | cut -f1) were used by /usr" 3.9 -for ii in /sbin /lib /bin; do 3.10 - mkdir -p ./usr/.moved\$ii 3.11 - for j in e2fsprogs pcmciautils cpio syslinux-extra isapnptools ncurses; do 3.12 - for k in \$(grep ^\$ii ./var/lib/tazpkg/installed/\$j/files.list) ; do 3.13 - [ -f .\$k ] || continue 3.14 - mv .\$k ./usr/.moved\$k 3.15 - ln -s /usr/.moved\$k .\$k 3.16 - done 3.17 - done 3.18 -done 3.19 -for ii in /var/lib/tazpkg/installed ; do 3.20 - j=\$(dirname /usr/.moved\$ii) 3.21 - mkdir -p .\$j 3.22 - mv .\$ii .\$j 3.23 - ln -s /usr/.moved\$ii .\$ii 3.24 -done 3.25 -echo "\$(du -hs ./usr/.moved | cut -f1) have been moved into /usr" 3.26 -echo "\$(du -hs ./usr | cut -f1) were used by /usr before compression" 3.27 -usr/sbin/mksquashfs usr .usr.sqfs 3.28 -rm -rf usr 3.29 -mkdir usr 3.30 -COMPRESSION="none" 3.31 -echo "\$(du -hs ./.usr.sqfs | cut -f1) are used by /usr after compression" 3.32 -EOF 3.33 + cp stuff/loram.rootfs $fs/etc/tazlito 3.34 } 3.35 3.36 get_patch() 3.37 @@ -44,7 +19,7 @@ 3.38 cat <<EOF 3.39 --- /etc/init.d/rcS 3.40 +++ /etc/init.d/rcS 3.41 -@@ -68,2 +68,9 @@ 3.42 +@@ -58,2 +58,9 @@ 3.43 3.44 +# Mount compressed /usr 3.45 +if [ -f /.usr.sqfs ]; then 3.46 @@ -73,5 +48,5 @@ 3.47 # Pre remove commands for Tazpkg. 3.48 pre_remove() 3.49 { 3.50 - get_patch | patch -R -p0 3.51 + [ -L /usr/bin/patch ] || get_patch | patch -R -p0 3.52 }
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/slitaz-loram/stuff/loram.rootfs Sat Mar 01 12:55:33 2008 +0000 4.3 @@ -0,0 +1,24 @@ 4.4 +echo "$(du -hs ./usr | cut -f1) were used by /usr" 4.5 +for ii in /sbin /lib /bin; do 4.6 + mkdir -p ./usr/.moved$ii 4.7 + for j in e2fsprogs pcmciautils cpio syslinux-extra isapnptools ncurses; do 4.8 + for k in $(grep ^$ii ./var/lib/tazpkg/installed/$j/files.list) ; do 4.9 + [ -f .$k ] || continue 4.10 + mv .$k ./usr/.moved$k 4.11 + ln -s /usr/.moved$k .$k 4.12 + done 4.13 + done 4.14 +done 4.15 +for ii in /var/lib/tazpkg/installed ; do 4.16 + j=$(dirname /usr/.moved$ii) 4.17 + mkdir -p .$j 4.18 + mv .$ii .$j 4.19 + ln -s /usr/.moved$ii .$ii 4.20 +done 4.21 +echo "$(du -hs ./usr/.moved | cut -f1) have been moved into /usr" 4.22 +echo "$(du -hs ./usr | cut -f1) were used by /usr before compression" 4.23 +usr/sbin/mksquashfs usr .usr.sqfs 4.24 +rm -rf usr 4.25 +mkdir usr 4.26 +COMPRESSION="none" 4.27 +echo "$(du -hs ./.usr.sqfs | cut -f1) are used by /usr after compression"