wok-6.x rev 233
UP: slitaz-loram (1.1)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Feb 16 23:07:30 2008 +0100 (2008-02-16) |
parents | 0257ebeb385f |
children | 0c00fe2eff1a |
files | slitaz-loram/receipt |
line diff
1.1 --- a/slitaz-loram/receipt Sat Feb 16 23:00:26 2008 +0100 1.2 +++ b/slitaz-loram/receipt Sat Feb 16 23:07:30 2008 +0100 1.3 @@ -1,7 +1,7 @@ 1.4 # SliTaz package receipt. 1.5 1.6 PACKAGE="slitaz-loram" 1.7 -VERSION="1.0" 1.8 +VERSION="1.1" 1.9 CATEGORY="misc" 1.10 SHORT_DESC="Rules to build low ram rootfs.gz." 1.11 MAINTAINER="pascal.bellard@slitaz.org" 1.12 @@ -12,10 +12,30 @@ 1.13 { 1.14 mkdir -p $fs/etc/tazlito 1.15 cat > $fs/etc/tazlito/loram.rootfs << EOF 1.16 +echo "\$(du -hs ./usr | cut -f1) were used by /usr" 1.17 +for ii in /sbin /lib /bin; do 1.18 + mkdir -p ./usr/.moved\$ii 1.19 + for j in e2fsprogs pcmciautils cpio syslinux-extra isapnptools ; do 1.20 + for k in \$(grep ^\$ii ./var/lib/tazpkg/installed/\$j/files.list) ; do 1.21 + [ -f .\$k ] || continue 1.22 + mv .\$k ./usr/.moved\$k 1.23 + ln -s /usr/.moved$k .\$k 1.24 + done 1.25 + done 1.26 +done 1.27 +for ii in /var/lib/tazpkg/installed ; do 1.28 + j=\$(dirname /usr/.moved\$ii) 1.29 + mkdir -p .\$j 1.30 + mv .\$ii .\$j 1.31 + ln -s /usr/.moved\$ii .\$ii 1.32 +done 1.33 +echo "\$(du -hs ./usr/.moved | cut -f1) have been moved into /usr" 1.34 +echo "\$(du -hs ./usr | cut -f1) were used by /usr before compression" 1.35 mksquashfs usr .usr.sqfs 1.36 rm -rf usr 1.37 mkdir usr 1.38 COMPRESSION="none" 1.39 +echo "\$(du -hs ./.usr.sqfs | cut -f1) are used by /usr after compression" 1.40 EOF 1.41 } 1.42 1.43 @@ -24,11 +44,13 @@ 1.44 cat <<EOF 1.45 --- /etc/init.d/rcS 1.46 +++ /etc/init.d/rcS 1.47 -@@ -79,2 +79,7 @@ 1.48 +@@ -79,2 +79,9 @@ 1.49 1.50 +# Mount compressed /usr 1.51 +if [ -f /.usr.sqfs ]; then 1.52 ++ echo -n "Mounting compressed /usr read-only... " 1.53 + /bin/mount -o loop,ro -t squashfs /.usr.sqfs /usr 1.54 ++ status 1.55 +fi 1.56 + 1.57 # Handle kernel cmdline parameter config=<device>,<path> to source a