wok-current annotate slitaz-loram-http/stuff/loram.extract @ rev 1290
Add slitaz-loram-http
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Aug 21 11:00:26 2008 +0000 (2008-08-21) |
parents | |
children | 52ca9fcdca28 |
rev | line source |
---|---|
pascal@1290 | 1 # remove link to cdrom |
pascal@1290 | 2 [ -d cdrom ] && rmdir cdrom |
pascal@1290 | 3 rm -f bin/vcsa2txt bin/awk bin/script bin/cut bin/readlink bin/du bin/free |
pascal@1290 | 4 if [ -L usr ]; then |
pascal@1290 | 5 rm usr |
pascal@1290 | 6 cp -a $1/usr . |
pascal@1290 | 7 fi |
pascal@1290 | 8 packedfs="$1/usr.cromfs" |
pascal@1290 | 9 if [ -f $packedfs ]; then |
pascal@1290 | 10 rmdir usr |
pascal@1290 | 11 rm -f bin/unmkcromfs |
pascal@1290 | 12 cp -a $1/unmkcromfs bin/unmkcromfs |
pascal@1290 | 13 bin/unmkcromfs $packedfs usr |
pascal@1290 | 14 [ "${packedfs%%/*}" = ".." ] && rm -f $packedfs |
pascal@1290 | 15 rm -f bin/cromfs-driver |
pascal@1290 | 16 cp -a $1/cromfs-driver bin/cromfs-driver |
pascal@1290 | 17 fi |
pascal@1290 | 18 packedfs="$1/usr.sqfs" |
pascal@1290 | 19 if [ -f $packedfs ]; then |
pascal@1290 | 20 rmdir usr |
pascal@1290 | 21 sbin/unsquashfs -d usr $packedfs |
pascal@1290 | 22 [ "${packedfs%%/*}" = ".." ] && rm -f $packedfs |
pascal@1290 | 23 fi |
pascal@1290 | 24 if [ -d usr/.moved ]; then |
pascal@1290 | 25 ( cd usr/.moved ; find * -print ) | \ |
pascal@1290 | 26 while read file; do |
pascal@1290 | 27 [ -L "$file" ] || continue |
pascal@1290 | 28 rm -f "$file" |
pascal@1290 | 29 mv "usr/.moved/$file" "$file" |
pascal@1290 | 30 done |
pascal@1290 | 31 rm -rf usr/.moved |
pascal@1290 | 32 fi |
pascal@1290 | 33 for ii in lib/libz.so lib/libstdc++.so lib/libgcc_s.so; do |
pascal@1290 | 34 [ -e $ii ] && mv $ii* usr/lib/ |
pascal@1290 | 35 done |
pascal@1290 | 36 if [ -L root ]; then |
pascal@1290 | 37 rm -f etc/keymap.conf etc/locale.conf etc/resolv.conf etc/TZ etc/motd |
pascal@1290 | 38 [ -d var/log.ORG ] && mv -f var/log.ORG var/log |
pascal@1290 | 39 [ -d var/run.ORG ] && mv -f var/run.ORG var/run |
pascal@1290 | 40 [ -d var/lock.ORG ] && mv -f var/lock.ORG var/lock |
pascal@1290 | 41 [ -d root.ORG ] && mv -f root.ORG root |
pascal@1290 | 42 rm -f media/cdrom |
pascal@1290 | 43 rmdir mnt/target |
pascal@1290 | 44 sed -i 's/CLEAN_UP_SYSTEM="no"/CLEAN_UP_SYSTEM="yes"/' etc/rcS.conf |
pascal@1290 | 45 sed -i 's/RUN_DAEMONS="/RUN_DAEMONS="slim /' etc/rcS.conf |
pascal@1290 | 46 fi |