wok-stable annotate slitaz-loram/stuff/loram.rootfs @ rev 4454
loram*: /etc/init.d/rcS needs find & xargs
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Nov 08 12:55:54 2009 +0100 (2009-11-08) |
parents | 6509db5aa948 |
children | 359526689366 |
rev | line source |
---|---|
pascal@309 | 1 echo "$(du -hs ./usr | cut -f1) were used by /usr" |
pascal@4099 | 2 for j in insmod unmkcromfs unsquashfs ; do |
pascal@4099 | 3 lib/ld-*.so --list *bin/$j 2> /dev/null | grep /usr/lib | cut -d\ -f3 | \ |
pascal@4099 | 4 while read ii; do |
pascal@4099 | 5 mv .${ii%%.so.*}.so* ./lib |
pascal@4099 | 6 done |
pascal@954 | 7 done |
pascal@309 | 8 for ii in /sbin /lib /bin; do |
pascal@309 | 9 mkdir -p ./usr/.moved$ii |
pascal@389 | 10 for j in e2fsprogs pcmciautils cpio syslinux-extra isapnptools ncurses \ |
pascal@389 | 11 libcap; do |
pascal@767 | 12 for k in $(grep -s ^$ii ./var/lib/tazpkg/installed/$j/files.list) ; do |
pascal@309 | 13 [ -f .$k ] || continue |
pascal@309 | 14 mv .$k ./usr/.moved$k |
pascal@309 | 15 ln -s /usr/.moved$k .$k |
pascal@309 | 16 done |
pascal@309 | 17 done |
pascal@309 | 18 done |
pascal@309 | 19 for ii in /var/lib/tazpkg/installed ; do |
pascal@309 | 20 j=$(dirname /usr/.moved$ii) |
pascal@309 | 21 mkdir -p .$j |
pascal@309 | 22 mv .$ii .$j |
pascal@309 | 23 ln -s /usr/.moved$ii .$ii |
pascal@309 | 24 done |
pascal@309 | 25 echo "$(du -hs ./usr/.moved | cut -f1) have been moved into /usr" |
pascal@309 | 26 echo "$(du -hs ./usr | cut -f1) were used by /usr before compression" |
pascal@1884 | 27 usr=usr |
pascal@389 | 28 if [ -x usr/bin/mkcromfs ]; then |
pascal@389 | 29 usr/bin/mkcromfs -qq -f 262144 -b 16384 usr .usr.cromfs |
pascal@389 | 30 else |
pascal@389 | 31 usr/sbin/mksquashfs usr .usr.sqfs |
pascal@389 | 32 fi |
pascal@1884 | 33 if [ -x bin/funionfs -o -d /var/lib/tazpkg/installed/aufs ]; then |
pascal@1884 | 34 mkdir .usr.rw .usr.ro |
pascal@1884 | 35 usr=.usr.ro |
pascal@1884 | 36 fi |
pascal@754 | 37 if [ -x bin/funionfs -o -x usr/bin/mkcromfs ]; then |
pascal@1884 | 38 ln -s /$usr/lib/$(cd usr/lib ; ls libfuse.so.2.*) lib/libfuse.so.2 |
pascal@369 | 39 fi |
pascal@309 | 40 rm -rf usr |
pascal@309 | 41 mkdir usr |
pascal@1931 | 42 COMPRESSION="gzip" |
pascal@389 | 43 echo "$(du -hs ./.usr.*fs | cut -f1) are used by /usr after compression" |
pascal@2140 | 44 for ii in bin/vcsa2txt bin/awk bin/script bin/cut bin/readlink bin/du bin/free \ |
pascal@4454 | 45 bin/killall5 bin/seq bin/find bin/xargs bin/patch; do |
pascal@1620 | 46 [ -e $ii ] || ln -s busybox $ii |
pascal@394 | 47 done |