source: ipk/source.sh4/emus_kbox_1_01pre24/CONTROL/postinst@ 14025

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

[ipk] update all swap/titan flash ipks

  • Property svn:executable set to *
File size: 1.3 KB
Line 
1#!/bin/sh
2TMP=/tmp/.keys
3PLUGINDIR=/var/keys
4PLUGINDIR=/var/bin
5CONFIGDIR=/var/etc
6echo "successfully installed"
7
8if [ ! -e /var/keys/cwshare.cfg ]; then
9 echo "use ipk config file: cwshare.cfg"
10 echo "rename /var/keys/cwshare.cfg.kbox > /var/keys/cwshare.cfg"
11 mv /var/keys/cwshare.cfg.kbox /var/keys/cwshare.cfg
12else
13 echo "found user config file: cwshare.cfg"
14 echo "skip ipk config file: cwshare.cfg.kbox"
15fi
16
17if [ ! -e /var/keys/kbox_cfg ]; then
18 echo "use ipk config file: kbox_cfg"
19 echo "rename /var/keys/kbox_cfg.kbox > /var/keys/kbox_cfg"
20 mv /var/keys/kbox_cfg.kbox /var/keys/kbox_cfg
21else
22 echo "found user config file: kbox_cfg"
23 echo "skip ipk config file: kbox_cfg.kbox"
24fi
25
26if [ ! -e /var/keys/nwcdcs.cfg ]; then
27 echo "use ipk config file: nwcdcs.cfg"
28 echo "rename /var/keys/nwcdcs.cfg.kbox > /var/keys/nwcdcs.cfg"
29 mv /var/keys/nwcdcs.cfg.kbox /var/keys/nwcdcs.cfg
30else
31 echo "found user config file: nwcdcs.cfg"
32 echo "skip ipk config file: nwcdcs.cfg.kbox"
33fi
34
35if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ]; then
36 SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1`
37 FREE=`expr $SPACE - 100`
38 echo new freespace size $FREE kb
39else
40 echo "syncing disk"
41 sync
42fi
43exit 0
Note: See TracBrowser for help on using the repository browser.