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