source: ipk/source.sh4/titanswapnetwork_openvpn/CONTROL/postrm@ 19144

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

fix openvpn

File size: 634 bytes
Line 
1#!/bin/sh
2TMP=/tmp/.tmp
3
4mv /var/etc/autostart/usercmd.sh.original /var/etc/autostart/usercmd.sh
5chmod 755 /var/etc/autostart/usercmd.sh
6echo "Originaldatei wird wieder hergestellt"
7
8rm -rf /var/swap/lib/modules
9rm -rf /var/swap/etc/openvpn
10
11echo "successfully removed"
12link=`readlink /var/swap`
13if [ `df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ] && [ $link = "/mnt/swapextensions" ]; then
14 SPACE=`df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1`
15 FREE=`expr $SPACE - 100`
16 echo new freespace size $FREE kb
17else
18 echo "syncing disk"
19 sync
20fi
21exit 0
Note: See TracBrowser for help on using the repository browser.