source: ipk/source.sh4/swapemus_gbox_802/CONTROL/postinst@ 15049

Last change on this file since 15049 was 15049, checked in by obi, 14 years ago

[ipk] readd swap gbox_802

  • Property svn:executable set to *
File size: 2.0 KB
Line 
1#!/bin/sh
2TMP=/tmp/.emu
3PLUGINDIR=/var/swap/bin
4CONFIGDIR=/var/swap/etc
5PLUGINDIR=/var/swap/keys
6
7
8if [ ! -e /var/swap/keys/cwshare.cfg ]; then
9 echo "use ipk config file: cwshare.cfg"
10 echo "rename /var/swap/keys/cwshare.cfg.gbox > /var/swap/keys/cwshare.cfg"
11 mv /var/swap/keys/cwshare.cfg.gbox /var/swap/keys/cwshare.cfg
12else
13 echo "found user config file: cwshare.cfg"
14 echo "skip ipk config file: cwshare.cfg.gbox"
15fi
16
17if [ ! -e /var/swap/bin/gbox_cfg ]; then
18 echo "use ipk config file: gbox_cfg"
19 echo "rename /var/swap/bin/gbox_cfg.gbox > /var/swap/bin/gbox_cfg"
20 mv /var/swap/bin/gbox_cfg.gbox /var/swap/bin/gbox_cfg
21else
22 echo "found user config file: gbox_cfg"
23 echo "skip ipk config file: gbox_cfg.gbox"
24fi
25
26if [ ! -e /var/swap/keys/ignore.list ]; then
27 echo "use ipk config file: ignore.list"
28 echo "rename /var/swap/keys/ignore.list.gbox > /var/swap/keys/ignore.list"
29 mv /var/swap/keys/ignore.list.gbox /var/swap/keys/ignore.list
30else
31 echo "found user config file: ignore.list"
32 echo "skip ipk config file: ignore.list.gbox"
33fi
34
35if [ ! -e /var/swap/keys/nagra ]; then
36 echo "use ipk config file: nagra"
37 echo "rename /var/swap/keys/nagra.gbox > /var/swap/keys/nagra"
38 mv /var/swap/keys/nagra.gbox /var/swap/keys/nagra
39else
40 echo "found user config file: nagra"
41 echo "skip ipk config file: nagra.gbox"
42fi
43
44if [ ! -e /var/swap/keys/softcam.cfg ]; then
45 echo "use ipk config file: softcam.cfg"
46 echo "rename /var/swap/keys/softcam.cfg.gbox > /var/swap/keys/softcam.cfg"
47 mv /var/swap/keys/softcam.cfg.gbox /var/swap/keys/softcam.cfg
48else
49 echo "found user config file: softcam.cfg"
50 echo "skip ipk config file: softcam.cfg.gbox"
51fi
52
53echo "successfully installed"
54link=`readlink /var/swap`
55if [ `df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ] && [ $link = "/mnt/swapextensions" ]; then
56 SPACE=`df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1`
57 FREE=`expr $SPACE - 100`
58 echo new freespace size $FREE kb
59else
60 echo "syncing disk"
61 sync
62fi
63exit 0
Note: See TracBrowser for help on using the repository browser.