add possibilty to compress content of multiple ipk files into loop mountable squashfs...
[opendreambox.git] / meta-opendreambox / recipes-dreambox / dreambox / dreambox-squashfs-support / enigma2_pre_start99.sh
1 #!/bin/sh
2
3 # dont delete this script !
4 # this script mounts/umounts squashfs compressed packages which was busy during package install / remove
5
6 for i in `find /var/tmp/ -maxdepth 1 -regex "^/var/tmp/\.umount_.\+_needed$"`; do
7         img=`echo $i | sed 's:^/var/tmp/\.umount_\(.\+\)_needed$:\1:'`
8         umount /media/squashfs-images/$img && losetup -d `losetup | grep $img | cut -d: -f1` > /dev/null 2>&1 && echo "successfully umounted /media/squashfs-images/$img" || /bin/true
9         rm $i || /bin/true
10 done;
11
12 for i in `find /var/tmp/ -maxdepth 1 -regex "^/var/tmp/\.mount_.\+_needed$"`; do
13         img=`echo $i | sed 's:^/var/tmp/\.mount_\(.\+\)_needed$:\1:'`
14         mount -t squashfs -o ro,loop /squashfs-images/$img /media/squashfs-images/$img > /dev/null 2>&1 && echo "successfully mounted /media/squashfs-images/$img" || /bin/true
15         rm $i || /bin/true
16 done;