]> git.ipfire.org Git - ipfire-2.x.git/blob - updates/1.4.6/setup
git-svn-id: http://svn.ipfire.org/svn/ipfire/IPFire/source@16 ea5c0bd1-69bd-2848...
[ipfire-2.x.git] / updates / 1.4.6 / setup
1 #!/bin/bash
2
3 UPGRADEVERSION="1.4.6"
4 PREVIOUSVERSION="1.4.5"
5 echo "This is the $UPGRADEVERSION update patch for IPCop $PREVIOUSVERSION installing."
6
7 CURRENTVERSION=`cat /etc/issue | awk '{ print $2 }' | sed -e 's/v//'`
8
9 if [ "$CURRENTVERSION" != "$PREVIOUSVERSION" ]; then
10 echo "You are not running IPCop v$PREVIOUSVERSION for this patch to install."
11 echo "Aborting installation."
12 exit -1
13 fi
14
15
16 /bin/sed -i -e "s+= '1.4.*$+= '$UPGRADEVERSION';+" /var/ipcop/general-functions.pl
17
18 /bin/tar -zxpf patch.tar.gz -C /
19 /usr/local/bin/restartsnort
20
21 # Fix for SF Bug 1174069
22 # "Invalid fixed MAC address" error message appears when trying to
23 # add or edit fixed leases in dhcp.cgi. Bug introduced in v1.4.4.
24 sed -i -e '/FIX_/d' /var/ipcop/dhcp/settings
25 chown 99:99 /var/ipcop/dhcp/settings
26
27 #DHCP need 2 new files. advoptions-list is in the patch
28 # advoptions created empty
29 touch /var/ipcop/dhcp/advoptions
30 chown nobody:nobody /var/ipcop/dhcp/advoptions
31 chown nobody:nobody /var/ipcop/dhcp/advoptions-list
32 chmod 644 /var/ipcop/dhcp/advoptions
33 chmod 444 /var/ipcop/dhcp/advoptions-list
34
35 # create a file in the update allow to remove the touch in setddns.pl
36 touch /var/ipcop/ddns/settings
37 chown nobody:nobody /var/ipcop/ddns/settings
38 chmod 644 /var/ipcop/ddns/settings
39
40 # Stop redirection in crontab
41 # this file is always empty and serve nothing
42 rm /var/log/dynupdate.log