wok view slitaz-loram-cdrom/stuff/loram.rootfs @ rev 785
slitaz-loram-cdrom: no daemon started
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue May 13 10:09:32 2008 +0000 (2008-05-13) |
parents | 2857e33d1bb6 |
children | d140ad412816 |
line source
1 echo "$(du -hs /usr | cut -f1) were used by /usr"
2 for ii in /sbin /lib /bin; do
3 mkdir -p ./usr/.moved$ii
4 for j in e2fsprogs pcmciautils cpio syslinux-extra isapnptools ncurses \
5 libcap; do
6 for k in $(grep -s ^$ii /var/lib/tazpkg/installed/$j/files.list) ; do
7 [ -f .$k ] || continue
8 mv .$k ./usr/.moved$k
9 ln -s /usr/.moved$k .$k
10 done
11 done
12 done
13 k="$(ls /lib/lib[rp]*.so)"
14 [ -x /bin/funionfs ] && k="$(ls /lib/libresolv*.so)"
15 for ii in /var/lib/tazpkg/installed /lib/modules/*/kernel/drivers/net \
16 /lib/modules/*/kernel/sound /sbin/depmod /sbin/modinfo /bin/lsmod \
17 /lib/libns*.so $k; do
18 [ -L .$ii ] && continue
19 j=$(dirname /usr/.moved$ii)
20 mkdir -p .$j
21 mv .$ii .$j
22 ln -s /usr/.moved$ii .$ii
23 done
24 echo "$(du -hs ./usr/.moved | cut -f1) have been moved into /usr"
25 usr=usr
26 if [ -x bin/funionfs -o -x usr/bin/mkcromfs ]; then
27 usr=.usr.ro
28 mkdir .usr.ro .usr.rw
29 ln -s /.usr.ro/lib/$(cd usr/lib ; ls libfuse.so.2.*) lib/libfuse.so.2
30 fi
31 if [ -x usr/bin/mkcromfs ]; then
32 usr/bin/mkcromfs -qq -f 262144 -b 16384 usr ../rootcd/usr.cromfs
33 rm -rf usr
34 mkdir usr
35 for ii in unmkcromfs cromfs-driver ; do
36 mv bin/$ii ../rootcd
37 ln -s /cdrom/$ii bin/$ii
38 done
39 elif [ -x usr/sbin/mksquashfs ]; then
40 usr/sbin/mksquashfs usr ../rootcd/usr.sqfs
41 rm -rf usr
42 mkdir usr
43 else
44 mv usr ../rootcd
45 [ "$usr" = "usr" ] || mv $usr usr
46 ln -s /cdrom/usr $usr
47 fi
48 for ii in *; do
49 case "$ii" in
50 usr|boot) continue;;
51 mnt|media|sys|proc|cdrom) mkdir ../rootcd/$ii;;
52 *) cp -a $ii ../rootcd/$ii;;
53 esac
54 done
55 for ii in keymap.conf locale.conf resolv.conf TZ motd; do
56 ln -s /tmp/$ii ../rootcd/etc
57 done
58 for ii in log run lock; do
59 mv ../rootcd/var/$ii ../rootcd/var/$ii.ORG
60 ln -s /tmp/$ii ../rootcd/var
61 done
62 mv ../rootcd/root ../rootcd/root.ORG
63 ln -s /tmp ../rootcd/root
64 ln -s / ../rootcd/media/cdrom
65 mkdir ../rootcd/mnt/target
66 sed -i 's/CLEAN_UP_SYSTEM="yes"/CLEAN_UP_SYSTEM="no"/' ../rootcd/etc/rcS.conf
67 sed -i 's/RUN_DAEMONS=.*/RUN_DAEMONS=""/' ../rootcd/etc/rcS.conf
68 for ii in ../rootcd/boot/isolinux/*.cfg; do
69 cat $ii | awk '{ print } /append/ { printf "label loram\n\tkernel /boot/bzImage\n\tappend ro sound=noconf screen=text %s %s %s\n",$5,$6,$7 }' > $ii.tmp
70 mv -f $ii.tmp $ii
71 done
72 for ii in bin/vcsa2txt bin/awk bin/script bin/cut bin/readlink ; do
73 ln -s busybox $ii
74 done
75 mkdir cdrom
76 COMPRESSION="gzip"