source: ipk/source.sh4/titansettings_default_sat_1_0/CONTROL/postrm@ 17828

Last change on this file since 17828 was 17828, checked in by andy-1, 14 years ago

fix

  • Property svn:executable set to *
File size: 1.2 KB
Line 
1#!/bin/sh
2TMP=/tmp/.set
3
4echo "remove /var/etc/titan/bouquets.*"
5rm -rf /var/etc/titan/bouquets.* > /dev/null 2>&1
6echo "remove /var/etc/titan/channel"
7rm -rf /var/etc/titan/channel > /dev/null 2>&1
8echo "remove /var/etc/titan/provider"
9rm -rf /var/etc/titan/provider > /dev/null 2>&1
10echo "remove /var/etc/titan/satellites"
11rm -rf /var/etc/titan/satellites > /dev/null 2>&1
12echo "remove /var/etc/titan/transponder"
13rm -rf /var/etc/titan/transponder > /dev/null 2>&1
14
15echo "successfully removed"
16if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ]; then
17 SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1`
18 FREE=`expr $SPACE - 100`
19 echo new freespace size $FREE kb
20else
21 echo "syncing disk"
22 sync
23fi
24
25echo "restore default settings"
26cp -a /etc/titan.restore/etc/titan/bouquets.* /var/etc/titan
27cp -a /etc/titan.restore/etc/titan/channel /var/etc/titan
28cp -a /etc/titan.restore/etc/titan/provider /var/etc/titan
29cp -a /etc/titan.restore/etc/titan/satellites /var/etc/titan
30cp -a /etc/titan.restore/etc/titan/transponder /var/etc/titan
31
32echo "Rebooting Box in 10s..."
33sleep 5
34(sleep 10;reboot) &
35exit 0
Note: See TracBrowser for help on using the repository browser.