source: ipk/source.sh4/swapemus_mgcamd_1_35/CONTROL/postinst@ 13635

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

[ipk] update all swap/titan flash ipks

File size: 2.7 KB
Line 
1#!/bin/sh
2TMP=/tmp/.mgcamd
3PLUGINDIR=/var/swap/bin
4CONFIGDIR=/var/swap/etc
5PLUGINDIR=/var/swap/keys
6
7
8if [ ! -e /var/swap/keys/cccamd.list ]; then
9 echo "use ipk config file: cccamd.list"
10 echo "rename /var/swap/keys/cccamd.list.mgcamd > /var/swap/keys/cccamd.list"
11 mv /var/swap/keys/cccamd.list.mgcamd /var/swap/keys/cccamd.list
12else
13 echo "found user config file: cccamd.list"
14 echo "skip ipk config file: cccamd.list.mgcamd"
15fi
16
17if [ ! -e /var/swap/keys/ignore.list ]; then
18 echo "use ipk config file: ignore.list"
19 echo "rename /var/swap/keys/ignore.list.mgcamd > /var/swap/keys/ignore.list"
20 mv /var/swap/keys/ignore.list.mgcamd /var/swap/keys/ignore.list
21else
22 echo "found user config file: cccamd.list"
23 echo "skip ipk config file: cccamd.list.mgcamd"
24fi
25
26if [ ! -e /var/swap/keys/mg_cfg ]; then
27 echo "use ipk config file: mg_cfg"
28 echo "rename /var/swap/keys/mg_cfg.mgcamd > /var/swap/keys/mg_cfg"
29 mv /var/swap/keys/mg_cfg.mgcamd /var/swap/keys/mg_cfg
30else
31 echo "found user config file: mg_cfg"
32 echo "skip ipk config file: mg_cfg.mgcamd"
33fi
34
35if [ ! -e /var/swap/keys/newcamd.list ]; then
36 echo "use ipk config file: newcamd.list"
37 echo "rename /var/swap/keys/newcamd.list.mgcamd > /var/swap/keys/newcamd.list"
38 mv /var/swap/keys/newcamd.list.mgcamd /var/swap/keys/newcamd.list
39else
40 echo "found user config file: newcamd.list"
41 echo "skip ipk config file: newcamd.list.mgcamd"
42fi
43
44if [ ! -e /var/swap/keys/peer.cfg ]; then
45 echo "use ipk config file: peer.cfg"
46 echo "rename /var/swap/keys/peer.cfg.mgcamd > /var/swap/keys/peer.cfg"
47 mv /var/swap/keys/peer.cfg.mgcamd /var/swap/keys/peer.cfg
48else
49 echo "found user config file: peer.cfg"
50 echo "skip ipk config file: peer.cfg.mgcamd"
51fi
52
53if [ ! -e /var/swap/keys/priority.list ]; then
54 echo "use ipk config file: priority.list"
55 echo "rename /var/swap/keys/priority.list.mgcamd > /var/swap/keys/priority.list"
56 mv /var/swap/keys/priority.list.mgcamd /var/swap/keys/priority.list
57else
58 echo "found user config file: priority.list"
59 echo "skip ipk config file: priority.list.mgcamd"
60fi
61
62if [ ! -e /var/swap/keys/replace.list ]; then
63 echo "use ipk config file: replace.list"
64 echo "rename /var/swap/keys/replace.list.mgcamd > /var/swap/keys/replace.list"
65 mv /var/swap/keys/replace.list.mgcamd /var/swap/keys/replace.list
66else
67 echo "found user config file: replace.list"
68 echo "skip ipk config file: replace.list.mgcamd"
69fi
70
71
72echo "successfully installed"
73link=`readlink /var/swap`
74if [ `df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ] && [ $link = "/mnt/swapextensions" ]; then
75 SPACE=`df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1`
76 FREE=`expr $SPACE - 100`
77 echo new freespace size $FREE kb
78else
79 echo "syncing disk"
80 sync
81fi
82exit 0
Note: See TracBrowser for help on using the repository browser.