]>
Commit | Line | Data |
---|---|---|
cd1a2927 MT |
1 | #!/bin/bash |
2 | ||
3 | UPGRADEVERSION="1.4.9" | |
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 | # Typo in 1.4.7 setup prevented removal of these files. Fixes SF Bug 1275075. | |
20 | # unneeded, updated, unified (old eci driver) | |
21 | /bin/rm -f /lib/{libbz2.so.1.0.2,libz.so.1.2.2,libproc.so.3.2.1} | |
22 | ||
23 | # Wrong permissions on /var/ipcop/addon-lang SF Bug 1283323 | |
24 | /bin/chown root:root /var/ipcop/addon-lang | |
25 | /bin/chmod 755 /var/ipcop/addon-lang | |
26 | ||
27 | # squid-2.5.STABLE11 CAN-2005-{2794,2796,2917} | |
28 | if [ -s /var/ipcop/proxy/squid.conf ]; then | |
29 | /usr/local/bin/restartsquid | |
30 | fi | |
31 | ||
32 | # remove ppp profile name display in all page when not used | |
33 | # Id: header.pl is not include in patch because different versions may exist | |
34 | /usr/bin/patch -Np0 < ./header.pl.patch /var/ipcop/header.pl | |
35 | ||
36 | # minimal optionsfw.cgi : ping filtering from GUI | |
37 | /bin/sed -i -e '/optionsfw.cgi/s/# ,/ ,/' /var/ipcop/header.pl | |
38 | /bin/mkdir -p /var/ipcop/optionsfw | |
39 | /bin/chmod 755 /var/ipcop/optionsfw | |
40 | /bin/chown nobody:nobody /var/ipcop/optionsfw | |
41 | /bin/echo "DISABLEPING=NO" > /var/ipcop/optionsfw/settings | |
42 | /bin/chown nobody:nobody /var/ipcop/optionsfw/settings | |
43 | /bin/chmod 644 /var/ipcop/optionsfw/settings | |
44 | /etc/rc.d/rc.firewall restart | |
45 | /etc/rc.d/rc.updatered | |
46 | ||
47 | #build cachelang file : use this call after all "lang/*.pl" updates | |
48 | perl -e "require '/var/ipcop/lang.pl'; &Lang::BuildCacheLang" | |
49 | ||
50 | echo "IPCop v$UPGRADEVERSION - The Bad Packets Stop Here">/etc/issue | |
51 | killall mingetty #redisplay correct version | |
52 | echo "end of $UPGRADEVERSION update" |