wok diff slitaz-loram-cdrom/stuff/loram.rootfs @ 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 | fc9f573e8ac8 |
children | c4e6b92f665f |
line diff
1.1 --- a/slitaz-loram-cdrom/stuff/loram.rootfs Sat Mar 08 11:30:12 2008 +0000 1.2 +++ b/slitaz-loram-cdrom/stuff/loram.rootfs Sun Mar 09 13:00:33 2008 +0000 1.3 @@ -1,7 +1,8 @@ 1.4 echo "$(du -hs /usr | cut -f1) were used by /usr" 1.5 for ii in /sbin /lib /bin; do 1.6 mkdir -p ./usr/.moved$ii 1.7 - for j in e2fsprogs pcmciautils cpio syslinux-extra isapnptools ncurses; do 1.8 + for j in e2fsprogs pcmciautils cpio syslinux-extra isapnptools ncurses \ 1.9 + libcap; do 1.10 for k in $(grep ^$ii /var/lib/tazpkg/installed/$j/files.list) ; do 1.11 [ -f .$k ] || continue 1.12 mv .$k ./usr/.moved$k 1.13 @@ -9,13 +10,18 @@ 1.14 done 1.15 done 1.16 done 1.17 -for ii in /var/lib/tazpkg/installed ; do 1.18 +k="$(ls /lib/lib[rp]*.so)" 1.19 +[ -x /bin/funionfs ] && k="$(ls /lib/libresolv*.so)" 1.20 +for ii in /var/lib/tazpkg/installed /lib/modules/*/kernel/drivers/net \ 1.21 + /lib/modules/*/kernel/sound /sbin/depmod /sbin/modinfo /bin/lsmod \ 1.22 + /lib/libns*.so $k; do 1.23 + [ -L .$ii ] && continue 1.24 j=$(dirname /usr/.moved$ii) 1.25 mkdir -p .$j 1.26 mv .$ii .$j 1.27 ln -s /usr/.moved$ii .$ii 1.28 done 1.29 -echo "$(du -hs /usr/.moved | cut -f1) have been moved into /usr" 1.30 +echo "$(du -hs ./usr/.moved | cut -f1) have been moved into /usr" 1.31 usr=usr 1.32 if [ -x bin/funionfs ]; then 1.33 usr=.usr.ro 1.34 @@ -36,7 +42,7 @@ 1.35 mkdir usr 1.36 else 1.37 mv usr ../rootcd 1.38 - [ "$usr" = "usr" ] || rmdir $usr 1.39 + [ "$usr" = "usr" ] || mv $usr usr 1.40 ln -s /cdrom/usr $usr 1.41 ln -s /bin ../rootcd/bin 1.42 fi 1.43 @@ -44,4 +50,5 @@ 1.44 ln -s busybox $ii 1.45 done 1.46 mkdir cdrom 1.47 +#rm -rf var/cache/fontconfig/* home/*/.ash* 1.48 COMPRESSION="gzip"