mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-26 10:52:57 +02:00
53 lines
2.0 KiB
Bash
53 lines
2.0 KiB
Bash
#!/bin/bash
|
|
|
|
UPGRADEVERSION="1.4.9"
|
|
PREVIOUSVERSION="1.4."$((`echo $UPGRADEVERSION | /usr/bin/cut -f3 -d '.'`-1))
|
|
echo "This is the $UPGRADEVERSION update patch for IPCop $PREVIOUSVERSION installing."
|
|
|
|
CURRENTVERSION=`perl -e "require '/var/ipcop/general-functions.pl';print \\$General::version;"`
|
|
if [ "$CURRENTVERSION" != "$PREVIOUSVERSION" ]; then
|
|
echo "You are not running IPCop v$PREVIOUSVERSION for this patch to install."
|
|
echo "Aborting installation."
|
|
exit -1
|
|
fi
|
|
|
|
# general-functions might not be overwrited by patch...
|
|
/bin/sed -i -e "s+= '1.4.*$+= '$UPGRADEVERSION';+" /var/ipcop/general-functions.pl
|
|
|
|
/bin/tar -zxpf patch.tar.gz -C /
|
|
|
|
# Typo in 1.4.7 setup prevented removal of these files. Fixes SF Bug 1275075.
|
|
# unneeded, updated, unified (old eci driver)
|
|
/bin/rm -f /lib/{libbz2.so.1.0.2,libz.so.1.2.2,libproc.so.3.2.1}
|
|
|
|
# Wrong permissions on /var/ipcop/addon-lang SF Bug 1283323
|
|
/bin/chown root:root /var/ipcop/addon-lang
|
|
/bin/chmod 755 /var/ipcop/addon-lang
|
|
|
|
# squid-2.5.STABLE11 CAN-2005-{2794,2796,2917}
|
|
if [ -s /var/ipcop/proxy/squid.conf ]; then
|
|
/usr/local/bin/restartsquid
|
|
fi
|
|
|
|
# remove ppp profile name display in all page when not used
|
|
# Id: header.pl is not include in patch because different versions may exist
|
|
/usr/bin/patch -Np0 < ./header.pl.patch /var/ipcop/header.pl
|
|
|
|
# minimal optionsfw.cgi : ping filtering from GUI
|
|
/bin/sed -i -e '/optionsfw.cgi/s/# ,/ ,/' /var/ipcop/header.pl
|
|
/bin/mkdir -p /var/ipcop/optionsfw
|
|
/bin/chmod 755 /var/ipcop/optionsfw
|
|
/bin/chown nobody:nobody /var/ipcop/optionsfw
|
|
/bin/echo "DISABLEPING=NO" > /var/ipcop/optionsfw/settings
|
|
/bin/chown nobody:nobody /var/ipcop/optionsfw/settings
|
|
/bin/chmod 644 /var/ipcop/optionsfw/settings
|
|
/etc/rc.d/rc.firewall restart
|
|
/etc/rc.d/rc.updatered
|
|
|
|
#build cachelang file : use this call after all "lang/*.pl" updates
|
|
perl -e "require '/var/ipcop/lang.pl'; &Lang::BuildCacheLang"
|
|
|
|
echo "IPCop v$UPGRADEVERSION - The Bad Packets Stop Here">/etc/issue
|
|
killall mingetty #redisplay correct version
|
|
echo "end of $UPGRADEVERSION update"
|