source: ipk/source.sh4/titansettings_default_matze70_sat_1_0/CONTROL/preinst@ 21833

Last change on this file since 21833 was 21833, checked in by obi, 13 years ago

update settings to /mnt/settings

  • Property svn:executable set to *
File size: 1.1 KB
Line 
1#!/bin/sh
2#
3TMP=/tmp/.set
4
5echo "installing settings ..."
6buildgroup=`cat /etc/.buildgroup`
7echo "checking OS"
8if [ `cat /etc/motd | grep $buildgroup | grep M | grep rev | wc -l` -eq 0 ]; then
9 echo ---------------------------
10 echo DONT USE this TPK Package!!
11 echo ---
12 echo Only for $buildgroup Image!!
13 echo ---------------------------
14 exit 1
15fi
16
17if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ]; then
18 SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1`
19 FREE=`expr $SPACE - 100`
20 SIZE=80
21 echo "checking freespace"
22 echo packege size $SIZE kb
23 echo freespace size $FREE kb
24 if [ "$FREE" -lt "$SIZE" ]; then
25 echo "sorry no freespace left on device"
26 exit 1
27 else
28 echo ok
29 fi
30else
31 echo "syncing disk"
32 sync
33fi
34
35if [ -e /tmp/.tpk_upgrade_start ];then
36 echo "tpk upgrade skip settings"
37 exit 1
38fi
39
40rm -f /mnt/settings/bouquets*
41rm -f /mnt/settings/channel
42rm -f /mnt/settings/provider
43rm -f /mnt/settings/transponder
44rm -f /mnt/settings/satellites
45rm -f /mnt/settings/epgchannel
46
47exit 0
Note: See TracBrowser for help on using the repository browser.