]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - 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
CommitLineData
cd1a2927
MT
1#!/bin/bash
2
3UPGRADEVERSION=1.4.11
4PREVIOUSVERSION="1.4."$((`echo $UPGRADEVERSION | /usr/bin/cut -f3 -d '.'`-1))
5echo "This is the $UPGRADEVERSION update patch for IPCop $PREVIOUSVERSION installing."
6
7CURRENTVERSION=`perl -e "require '/var/ipcop/general-functions.pl';print \\$General::version;"`
8if [ "$CURRENTVERSION" != "$PREVIOUSVERSION" ]; then
9 echo "You are not running IPCop v$PREVIOUSVERSION for this patch to install."
10 echo "Aborting installation."
11 exit -1
12fi
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
21find /var/ipcop/backup/sets/* -type d -exec mv {} /home/httpd/html/backup \;
22# delete gz
23find /home/httpd/html/backup -iname *gz -exec rm {} \;
24
25#bug sf #1369531
26sed -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
34mkdir /var/ipcop/private
35chown 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
39settings=/var/ipcop/vpn/settings
40grep -q "VPN_DELAYED_START" $settings || echo "VPN_DELAYED_START=0">>$settings
41
42
43#build cachelang file after all "lang/*.pl" updates
44perl -e "require '/var/ipcop/lang.pl'; &Lang::BuildCacheLang"
45
46killall mingetty #redisplay correct version
47echo "end of $UPGRADEVERSION update"