source: ipk/source/settings_default_1.0/CONTROL/preinst@ 5437

Last change on this file since 5437 was 4886, checked in by obi, 15 years ago

[ipk] add default settings again

File size: 2.2 KB
Line 
1#!/bin/sh
2#
3TMP=/tmp/.set
4echo "syncing disk"
5sync
6
7model=`cat /etc/model`
8echo""
9echo "Checking your Boxtype...."
10echo "Some Plugins will not work correctly on your $model!"
11echo ""
12if [ "$model" = "" ]; then
13 echo "Sorry! This Plugin is not available for your $model because it will not work correctly!!!"
14 echo "Aborting installation..."
15 exit 1
16else
17 echo "Boxtype: $model OK"
18fi
19
20#lamedb 67
21#sattelites 11
22#rest 15
23if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1 | wc -l` -eq 1 ]; then
24 SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1`
25 FREE=`expr $SPACE - 93`
26 SIZE=735
27 MIN=10
28 echo "checking freespace"
29 if [ -e /etc/enigma2/lamedb ]; then
30 echo skipped lamdb allready installed
31 du /etc/enigma2/lamedb > /tmp/.sub
32 SUB=`cat /tmp/.sub | cut -d / -f1 | sed 's/ \+/ /g'`
33 MIN=`expr $MIN + $SUB`
34 fi
35 if [ -e /etc/enigma2/satellites.xml ]; then
36 echo skipped satellites.xml allready installed
37 du /etc/enigma2/satellites.xml > /tmp/.sub
38 SUB=`cat /tmp/.sub | cut -d / -f1 | sed 's/ \+/ /g'`
39 MIN=`expr $MIN + $SUB`
40 fi
41 echo packege size $SIZE kb
42 echo package skiped $MIN kb
43 SIZEEND=`expr $SIZE - $MIN`
44 echo package install $SIZEEND kb
45 echo freespace size $FREE kb
46 if [ "$FREE" -lt "$SIZEEND" ]; then
47 echo "sorry no freespace left on device"
48 exit 1
49 else
50 echo ok
51 fi
52fi
53echo "installing settings ..."
54echo "checking OS"
55if [ `cat /etc/motd | grep AAF | grep M | grep rev | wc -l` -eq 0 ]; then
56 echo ---------------------------
57 echo DONT USE this IPK Package!!
58 echo ---
59 echo Only for AAF Image!!
60 echo ---------------------------
61 exit 1
62fi
63if [ -e /etc/enigma2/settings_installed ]; then
64 TYPE=`cat /etc/enigma2/settings_installed`
65 echo -----------------------------------
66 echo ""
67 echo removing $TYPE Settings first !!
68 echo ""
69 echo -----------------------------------
70 exit 1
71fi
72
73echo "remove /etc/enigma2/*.tv"
74rm -rf /etc/enigma2/*.tv
75echo "remove /etc/enigma2/*.radio"
76rm -rf /etc/enigma2/*.radio
77echo "remove /etc/enigma2/satellites.xml"
78rm -rf /etc/enigma2/satellites.xml
79echo "remove /etc/enigma2/lamedb"
80rm -rf /etc/enigma2/lamedb
81echo "remove /etc/enigma2/userbouquet.*"
82rm -rf /etc/enigma2/userbouquet.*
83
84exit 0
Note: See TracBrowser for help on using the repository browser.