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