]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - updates/1.4.11/setup
git-svn-id: http://svn.ipfire.org/svn/ipfire/IPFire/source@16 ea5c0bd1-69bd-2848...
[people/pmueller/ipfire-2.x.git] / updates / 1.4.11 / setup
1 #!/bin/bash
2
3 UPGRADEVERSION=1.4.11
4 PREVIOUSVERSION="1.4."$((`echo $UPGRADEVERSION | /usr/bin/cut -f3 -d '.'`-1))
5 echo "This is the $UPGRADEVERSION update patch for IPCop $PREVIOUSVERSION installing."
6
7 CURRENTVERSION=`perl -e "require '/var/ipcop/general-functions.pl';print \\$General::version;"`
8 if [ "$CURRENTVERSION" != "$PREVIOUSVERSION" ]; then
9 echo "You are not running IPCop v$PREVIOUSVERSION for this patch to install."
10 echo "Aborting installation."
11 exit -1
12 fi
13
14 # general-functions might not be overwrited by patch...
15 /bin/sed -i -e "s+= '1.4.*$+= '$UPGRADEVERSION';+" /var/ipcop/general-functions.pl
16
17 /bin/tar -zxpf patch.tar.gz -C /
18
19 # Backup have changed a little. Sets are located under Apache to facilitate
20 # their exportation. Unencrypted backups do not exists any more
21 find /var/ipcop/backup/sets/* -type d -exec mv {} /home/httpd/html/backup \;
22 # delete gz
23 find /home/httpd/html/backup -iname *gz -exec rm {} \;
24
25 #bug sf #1369531
26 sed -i -e 's/port 800/port __PROXY_PORT__/' /var/ipcop/proxy/acl
27
28 # patch rc.sysinit to include Slovak
29 /bin/sed -i -e 's/-o "$LANGUAGE" = "pl" ]/-o "$LANGUAGE" = "pl" -o "$LANGUAGE" = "sk" ]/' /etc/rc.d/rc.sysinit
30
31 # move randfile out of this dir, cause it annoys openswann
32 [ -e /var/ipcop/ca/.rnd ] && mv -f /var/ipcop/ca/.rnd /var/tmp/.rnd
33 # idem for private key cakey.pem
34 mkdir /var/ipcop/private
35 chown nobody:nobody /var/ipcop/private
36 [ -e /var/ipcop/ca/cakey.pem ] && mv -f /var/ipcop/ca/cakey.pem /var/ipcop/private/cakey.pem
37
38 #create variable missing
39 settings=/var/ipcop/vpn/settings
40 grep -q "VPN_DELAYED_START" $settings || echo "VPN_DELAYED_START=0">>$settings
41
42
43 #build cachelang file after all "lang/*.pl" updates
44 perl -e "require '/var/ipcop/lang.pl'; &Lang::BuildCacheLang"
45
46 killall mingetty #redisplay correct version
47 echo "end of $UPGRADEVERSION update"