wok-current view slitaz-loram-cdrom/stuff/loram.rootfs @ rev 1255

Add netatalk
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Aug 13 09:43:42 2008 +0000 (2008-08-13)
parents 304c0cd8d5e5
children 52ca9fcdca28
line source
1 echo "$(du -hs /usr | cut -f1) were used by /usr"
2 lib/ld-*.so --list ./sbin/insmod | grep /usr/lib | cut -d\ -f3 | \
3 while read ii; do
4 mv .${ii%%.so.*}.so* ./lib
5 done
6 for ii in /sbin /lib /bin; do
7 mkdir -p ./usr/.moved$ii
8 for j in e2fsprogs pcmciautils cpio syslinux-extra isapnptools ncurses \
9 libcap; do
10 for k in $(grep -s ^$ii /var/lib/tazpkg/installed/$j/files.list) ; do
11 [ -f .$k ] || continue
12 mv .$k ./usr/.moved$k
13 ln -s /usr/.moved$k .$k
14 done
15 done
16 done
17 k="$(ls /lib/lib[rp]*.so)"
18 [ -x /bin/funionfs ] && k="$(ls /lib/libresolv*.so)"
19 for ii in /var/lib/tazpkg/installed /lib/modules/*/kernel/drivers/net \
20 /lib/modules/*/kernel/sound /sbin/depmod /sbin/modinfo /bin/lsmod \
21 /lib/libns*.so $k; do
22 [ -L .$ii ] && continue
23 j=$(dirname /usr/.moved$ii)
24 mkdir -p .$j
25 mv .$ii .$j
26 ln -s /usr/.moved$ii .$ii
27 done
28 echo "$(du -hs ./usr/.moved | cut -f1) have been moved into /usr"
29 usr=usr
30 if [ -x bin/funionfs -o -x usr/bin/mkcromfs ]; then
31 usr=.usr.ro
32 mkdir .usr.ro .usr.rw
33 ln -s /.usr.ro/lib/$(cd usr/lib ; ls libfuse.so.2.*) lib/libfuse.so.2
34 fi
35 if [ -x usr/bin/mkcromfs ]; then
36 usr/bin/mkcromfs -qq -f 262144 -b 16384 usr ../rootcd/usr.cromfs
37 rm -rf usr
38 mkdir usr
39 for ii in unmkcromfs cromfs-driver ; do
40 mv bin/$ii ../rootcd
41 ln -s /cdrom/$ii bin/$ii
42 done
43 elif [ -x usr/sbin/mksquashfs ]; then
44 usr/sbin/mksquashfs usr ../rootcd/usr.sqfs
45 rm -rf usr
46 mkdir usr
47 else
48 mv usr ../rootcd
49 [ "$usr" = "usr" ] || mv $usr usr
50 ln -s /cdrom/usr $usr
51 fi
52 if [ -d ../rootcd/usr/lib ]; then
53 for ii in *; do
54 case "$ii" in
55 usr|boot|home) continue;;
56 mnt|media|sys|proc|cdrom) mkdir ../rootcd/$ii;;
57 *) cp -a $ii ../rootcd/$ii;;
58 esac
59 done
60 for ii in media/*; do
61 [ "$ii" = "media/cdrom" ] || mkdir ../rootcd/$ii
62 done
63 for ii in keymap.conf locale.conf resolv.conf TZ motd; do
64 rm -f ../rootcd/etc/$ii
65 ln -s /tmp/$ii ../rootcd/etc/$ii
66 done
67 ln -s /tmp/detected-modules ../rootcd/var/lib/detected-modules
68 for ii in log run lock; do
69 mv ../rootcd/var/$ii ../rootcd/var/$ii.ORG
70 ln -s /tmp ../rootcd/var/$ii
71 done
72 mv ../rootcd/root ../rootcd/root.ORG
73 ln -s /tmp ../rootcd/root
74 ln -s /tmp ../rootcd/home
75 ln -s / ../rootcd/media/cdrom
76 mkdir ../rootcd/mnt/target
77 sed -i 's/CLEAN_UP_SYSTEM="yes"/CLEAN_UP_SYSTEM="no"/' ../rootcd/etc/rcS.conf
78 sed -i 's/RUN_DAEMONS=.*/RUN_DAEMONS=""/' ../rootcd/etc/rcS.conf
79 for ii in ../rootcd/boot/isolinux/*.cfg; do
80 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
81 mv -f $ii.tmp $ii
82 done
83 cat >> ../rootcd/boot/isolinux/enopts.txt <<EOT
84 With few RAM, you can use loram entry with the cdrom device; example:
85 boot: loram root=/dev/hdc
86 EOT
87 cat >> ../rootcd/boot/isolinux/options.txt <<EOT
88 Avec peu de RAM, utilisez l'entrée loram en précisant le cdrom, exemple:
89 boot: loram root=/dev/hdc
90 EOT
91 fi
92 for ii in bin/vcsa2txt bin/awk bin/script bin/cut bin/readlink bin/du bin/free; do
93 ln -s busybox $ii
94 done
95 mkdir cdrom
96 COMPRESSION="gzip"