]> git.ipfire.org Git - ipfire-2.x.git/blob - updates/1.4.3/setup
git-svn-id: http://svn.ipfire.org/svn/ipfire/IPFire/source@16 ea5c0bd1-69bd-2848...
[ipfire-2.x.git] / updates / 1.4.3 / setup
1 #!/bin/bash
2
3 UPGRADEVERSION="1.4.3"
4 PREVIOUSVERSION="1.4.2"
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 # Make some space first
16 /sbin/tune2fs -m 0 /dev/harddisk1
17 /sbin/tune2fs -m 1 /dev/harddisk4
18 /bin/rm -rf /var/patches/patch-*.tar.gz.gpg
19 /bin/rm -rf /etc/eagle-usb/dsp
20
21 /bin/tar -zxpf patch.tar.gz -C /
22
23 # update linker cache
24 /bin/rm -rf /lib/libz.so.1.2.1
25 /bin/rm -rf /usr/lib/libpng.so.3.1.2.7
26 /sbin/ldconfig
27
28 # Change tar.gz to tgz.gpg in language files.
29 # Completes fix for SF Bug 1077494
30 for file in /var/ipcop/langs/*.pl
31 do
32 sed -i -e '/to install an update/s/.tar.gz/.tgz.gpg/' $file
33 done
34
35 touch /var/ipcop/ddns/settings
36 chown 99:99 /var/ipcop/ddns/settings
37
38 # Fix file permissions of updated files
39 chown 99:99 /var/ipcop/modem/defaults
40
41 #this is in general v1.4.4 and we want v1.4.3 be displayed
42 /bin/sed -i -e "s+= '1.4.*$+= '$UPGRADEVERSION';+" /var/ipcop/header.pl
43 echo "IPCop v1.4.3 - The Bad Packets Stop Here" > /etc/issue