]> git.ipfire.org Git - ipfire-2.x.git/blame - updates/1.4.6/setup
git-svn-id: http://svn.ipfire.org/svn/ipfire/IPFire/source@29 ea5c0bd1-69bd-2848...
[ipfire-2.x.git] / updates / 1.4.6 / setup
CommitLineData
cd1a2927
MT
1#!/bin/bash
2
3UPGRADEVERSION="1.4.6"
4PREVIOUSVERSION="1.4.5"
5echo "This is the $UPGRADEVERSION update patch for IPCop $PREVIOUSVERSION installing."
6
7CURRENTVERSION=`cat /etc/issue | awk '{ print $2 }' | sed -e 's/v//'`
8
9if [ "$CURRENTVERSION" != "$PREVIOUSVERSION" ]; then
10 echo "You are not running IPCop v$PREVIOUSVERSION for this patch to install."
11 echo "Aborting installation."
12 exit -1
13fi
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.
24sed -i -e '/FIX_/d' /var/ipcop/dhcp/settings
25chown 99:99 /var/ipcop/dhcp/settings
26
27#DHCP need 2 new files. advoptions-list is in the patch
28# advoptions created empty
29touch /var/ipcop/dhcp/advoptions
30chown nobody:nobody /var/ipcop/dhcp/advoptions
31chown nobody:nobody /var/ipcop/dhcp/advoptions-list
32chmod 644 /var/ipcop/dhcp/advoptions
33chmod 444 /var/ipcop/dhcp/advoptions-list
34
35# create a file in the update allow to remove the touch in setddns.pl
36touch /var/ipcop/ddns/settings
37chown nobody:nobody /var/ipcop/ddns/settings
38chmod 644 /var/ipcop/ddns/settings
39
40# Stop redirection in crontab
41# this file is always empty and serve nothing
42rm /var/log/dynupdate.log