wok rev 390
Slitaz-loram-cdrom: decrease memory footprint a bit
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Mar 09 13:00:33 2008 +0000 (2008-03-09) |
parents | 5b4e22afe799 |
children | 65917c1049b9 |
files | slitaz-loram-cdrom/receipt slitaz-loram-cdrom/stuff/loram.rootfs |
line diff
1.1 --- a/slitaz-loram-cdrom/receipt Sun Mar 09 12:58:23 2008 +0000 1.2 +++ b/slitaz-loram-cdrom/receipt Sun Mar 09 13:00:33 2008 +0000 1.3 @@ -26,7 +26,7 @@ 1.4 line="-$(($i-24)),26 +$(($i-24)),2" 1.5 i="-" 1.6 else 1.7 - grep -q 'if [ -d /cdrom ]; then' $1/etc/init.d/rcS && return 1.8 + grep -q 'from slitaz-loram-cdrom package' $1/etc/init.d/rcS && return 1.9 line="-$i,2 +$i,26" 1.10 i="+" 1.11 fi 1.12 @@ -35,7 +35,7 @@ 1.13 +++ $1/etc/init.d/rcS 1.14 @@ $line @@ 1.15 1.16 -$i# Mount /usr 1.17 +$i# Mount /usr (from slitaz-loram-cdrom package) 1.18 $i if [ -d /cdrom ]; then 1.19 $i mount -o ro -t iso9660 /dev/cdrom /cdrom 1.20 $i if [ -d /.usr.rw -a -x /bin/funionfs ]; then 1.21 @@ -68,9 +68,11 @@ 1.22 pre_install() 1.23 { 1.24 local i 1.25 + . /etc/tazlito/tazlito.conf 1.26 for i in $(cd /var/lib/tazpkg/installed ; ls -d slitaz-loram* 2> /dev/null); do 1.27 [ "$i" = "$PACKAGE" ] && continue 1.28 yes y | tazpkg remove $i 1.29 + rm -f $PACKAGES_REPOSITORY/slitaz-boot-scripts-*.tazpkg 2> /dev/null 1.30 done 1.31 } 1.32 1.33 @@ -79,9 +81,12 @@ 1.34 set_patch "$1" 1.35 if [ ! -x /bin/funionfs ]; then 1.36 cat <<EOF 1.37 +---- 1.38 You will build a live CD with /usr mounted read-only. 1.39 -You can install funionfs to have read-write access to /usr with: 1.40 +You can install funionfs to have read-write access into /usr with: 1.41 + 1.42 # tazpkg get-install funionfs 1.43 + 1.44 EOF 1.45 fi 1.46 }
2.1 --- a/slitaz-loram-cdrom/stuff/loram.rootfs Sun Mar 09 12:58:23 2008 +0000 2.2 +++ b/slitaz-loram-cdrom/stuff/loram.rootfs Sun Mar 09 13:00:33 2008 +0000 2.3 @@ -1,7 +1,8 @@ 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 j in e2fsprogs pcmciautils cpio syslinux-extra isapnptools ncurses \ 2.9 + libcap; do 2.10 for k in $(grep ^$ii /var/lib/tazpkg/installed/$j/files.list) ; do 2.11 [ -f .$k ] || continue 2.12 mv .$k ./usr/.moved$k 2.13 @@ -9,13 +10,18 @@ 2.14 done 2.15 done 2.16 done 2.17 -for ii in /var/lib/tazpkg/installed ; do 2.18 +k="$(ls /lib/lib[rp]*.so)" 2.19 +[ -x /bin/funionfs ] && k="$(ls /lib/libresolv*.so)" 2.20 +for ii in /var/lib/tazpkg/installed /lib/modules/*/kernel/drivers/net \ 2.21 + /lib/modules/*/kernel/sound /sbin/depmod /sbin/modinfo /bin/lsmod \ 2.22 + /lib/libns*.so $k; do 2.23 + [ -L .$ii ] && continue 2.24 j=$(dirname /usr/.moved$ii) 2.25 mkdir -p .$j 2.26 mv .$ii .$j 2.27 ln -s /usr/.moved$ii .$ii 2.28 done 2.29 -echo "$(du -hs /usr/.moved | cut -f1) have been moved into /usr" 2.30 +echo "$(du -hs ./usr/.moved | cut -f1) have been moved into /usr" 2.31 usr=usr 2.32 if [ -x bin/funionfs ]; then 2.33 usr=.usr.ro 2.34 @@ -36,7 +42,7 @@ 2.35 mkdir usr 2.36 else 2.37 mv usr ../rootcd 2.38 - [ "$usr" = "usr" ] || rmdir $usr 2.39 + [ "$usr" = "usr" ] || mv $usr usr 2.40 ln -s /cdrom/usr $usr 2.41 ln -s /bin ../rootcd/bin 2.42 fi 2.43 @@ -44,4 +50,5 @@ 2.44 ln -s busybox $ii 2.45 done 2.46 mkdir cdrom 2.47 +#rm -rf var/cache/fontconfig/* home/*/.ash* 2.48 COMPRESSION="gzip"