wok-stable view slitaz-loram/stuff/loram.rootfs @ rev 11200
pam: update bdeps
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Nov 03 08:46:41 2011 +0100 (2011-11-03) |
parents | 738a9be33f09 |
children |
line source
1 echo "$(du -hs ./usr | cut -f1) were used by /usr"
2 for j in insmod unmkcromfs unsquashfs ; do
3 lib/ld-*.so --list *bin/$j 2> /dev/null | grep /usr/lib | cut -d\ -f3 | \
4 while read ii; do
5 mv .${ii%%.so.*}.so* ./lib
6 done
7 done
8 for ii in /sbin /lib /bin; do
9 mkdir -p ./usr/.moved$ii
10 for j in e2fsprogs pcmciautils cpio syslinux-extra isapnptools ncurses \
11 libcap; do
12 for k in $(grep -s ^$ii ./var/lib/tazpkg/installed/$j/files.list) ; do
13 [ -f .$k ] || continue
14 mv .$k ./usr/.moved$k
15 ln -s /usr/.moved$k .$k
16 done
17 done
18 done
19 for ii in /var/lib/tazpkg/installed ; do
20 j=$(dirname /usr/.moved$ii)
21 mkdir -p .$j
22 mv .$ii .$j
23 ln -s /usr/.moved$ii .$ii
24 done
25 echo "$(du -hs ./usr/.moved | cut -f1) have been moved into /usr"
26 echo "$(du -hs ./usr | cut -f1) were used by /usr before compression"
27 usr=usr
28 if [ -x usr/bin/mkcromfs ]; then
29 usr/bin/mkcromfs -qq -f 262144 -b 16384 usr .usr.cromfs
30 else
31 usr/sbin/mksquashfs usr .usr.sqfs -comp xz -Xbcj x86
32 fi
33 if [ -x bin/funionfs -o -d /var/lib/tazpkg/installed/aufs-utils ]; then
34 mkdir .usr.rw .usr.ro
35 usr=.usr.ro
36 fi
37 if [ -x bin/funionfs -o -x usr/bin/mkcromfs ]; then
38 ln -s /$usr/lib/$(cd usr/lib ; ls libfuse.so.2.*) lib/libfuse.so.2
39 fi
40 rm -rf usr
41 mkdir usr
42 echo "$(du -hs ./.usr.*fs | cut -f1) are used by /usr after compression"
43 for ii in bin/vcsa2txt bin/awk bin/script bin/cut bin/readlink bin/du bin/free \
44 bin/killall5 bin/seq bin/find bin/xargs bin/patch; do
45 [ -e $ii ] || ln -s busybox $ii
46 done
47 [ -e bin/vcsa2txt ] || ln -s busybox bin/conspy
48 echo .usr.*fs | cpio -o -H newc > $1/rootfs.gz2
49 rm -f .usr.*fs