Files
bpfire/updates/1.4.2/setup

26 lines
747 B
Bash

#!/bin/sh
echo "This is the 1.4.2 update patch for IPCop 1.4.1 installing."
CURRENTVERSION=`cat /etc/issue | awk '{ print $2 }' | sed -e 's/v//'`
UPGRADEVERSION="1.4.2"
if [ "$CURRENTVERSION" != "1.4.1" -a "$CURRENTVERSION" != "1.4.2" ]; then
echo "You are not running IPCop v1.4.1 for this patch to install."
echo "Aborting installation."
exit -1
fi
/bin/tar -zxpf patch.tar.gz -C /
/sbin/depmod -a
/bin/rm -f /var/run/need-depmod-`uname -r`
# shift eciadsl data to /etc (modems.db use a different format)
/bin/rm -f /var/ipcop/eciadsl/{firmware00.bin,modems.db}
# Fix leases problem (ends never) should have been done in 1.4.1 upgrade
killall dhcpd
rm -f /var/state/dhcp/*
touch /var/state/dhcp/dhcpd.leases
/usr/local/bin/restartdhcp