# along with IPFire; if not, write to the Free Software #
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
# #
-# Copyright (C) 2012 IPFire-Team <info@ipfire.org>. #
+# Copyright (C) 2013 IPFire-Team <info@ipfire.org>. #
# #
############################################################################
#
#
#
-KVER="3.2.34"
+KVER="3.2.37"
MOUNT=`grep "kernel" /boot/grub/grub.conf 2>/dev/null | tail -n 1 `
# Nur den letzten Parameter verwenden
echo $MOUNT > /dev/null
add_to_backup etc/sysconfig/lm_sensors
add_to_backup etc/sysconfig/rc.local
add_to_backup usr/local/bin/vpn-watch
+add_to_backup usr/local/bin/updxsetperms
add_to_backup usr/libexec/ipsec
# Backup the files
-tar cJvf /var/ipfire/backup/core-upgrade_$KVER.tar.xz \
+tar cJvf /var/ipfire/backup/core-upgrade$core_$KVER.tar.xz \
-C / -T /opt/pakfire/tmp/ROOTFILES --exclude='#*' --exclude='/var/cache' > /dev/null 2>&1
# Check diskspace on root
exit 2
fi
+# Add user nobody to group squid.
+usermod -a -G squid nobody
+
echo
echo Update Kernel to $KVER ...
#
/etc/init.d/snort stop
/etc/init.d/squid stop
/etc/init.d/ipsec stop
+/etc/init.d/apache stop
+
#Remove old snort, zoneinfo and ncurses-libs(wrong path).
rm -rf /etc/snort
rm -f /usr/libexec/ipsec/{pluto,_pluto_adns,whack}
rm -f /usr/local/bin/vpn-watch
+# Remove update accelerator permissions script.
+rm -f /usr/local/bin/updxsetperms
+
#
#Extract files
tar xavf /opt/pakfire/tmp/files* --no-overwrite-dir -p --numeric-owner -C /
* )
/usr/bin/logger -p syslog.emerg -t ipfire \
"core-update-$core: FATAL-ERROR space run out on boot. System is not bootable..."
+ /etc/init.d/apache start
exit 4
;;
esac
# Regenerate ipsec configuration files.
/srv/web/ipfire/cgi-bin/vpnmain.cgi
+# Convert OpenVPN RW connections.
+/usr/sbin/ovpn-ccd-convert
+
+touch /var/ipfire/ovpn/ccd.conf
+touch /var/ipfire/ovpn/ccdroute
+touch /var/ipfire/ovpn/ccdroute2
+chown nobody:nobody /var/ipfire/ovpn/ccd.conf
+chown nobody:nobody /var/ipfire/ovpn/ccdroute
+chown nobody:nobody /var/ipfire/ovpn/ccdroute2
+
+# Update crontab.
+sed -i /var/spool/cron/root.orig \
+ -e 's@^.*fcron.weekly.*$@\&nice(10),bootrun 47 2 \* \* 1\ttest -x /usr/local/bin/run-parts \&\& /usr/local/bin/run-parts /etc/fcron.weekly@'
+fcrontab -z &>/dev/null
+
#
# Start services
#
+/etc/init.d/apache start
/etc/init.d/squid start
/etc/init.d/snort start
if [ `grep "ENABLED=on" /var/ipfire/vpn/settings` ]; then
#
# ReInstall grub
#
- grub-install --no-floppy ${ROOT::`expr length $ROOT`-1} --recheck
+ echo "(hd0) ${ROOT::`expr length $ROOT`-1}" > /boot/grub/device.map
+ grub-install --no-floppy ${ROOT::`expr length $ROOT`-1}
;;
esac
#
"core-update-$core: WARNING not enough space for pae kernel."
else
echo "Name: linux-pae" > /opt/pakfire/db/installed/meta-linux-pae
- echo "ProgVersion: 3.2.34" >> /opt/pakfire/db/installed/meta-linux-pae
- echo "Release: 23" >> /opt/pakfire/db/installed/meta-linux-pae
+ echo "ProgVersion: 3.2.37" >> /opt/pakfire/db/installed/meta-linux-pae
+ echo "Release: 26" >> /opt/pakfire/db/installed/meta-linux-pae
fi
fi
if [ -e "/opt/pakfire/db/installed/meta-linux-xen" ]; then
echo "Name: linux-xen" > /opt/pakfire/db/installed/meta-linux-xen
echo "ProgVersion: 2.6.32.60" >> /opt/pakfire/db/installed/meta-linux-xen
- echo "Release: 23" >> /opt/pakfire/db/installed/meta-linux-xen
+ echo "Release: 24" >> /opt/pakfire/db/installed/meta-linux-xen
+ # Add xvc0 to /etc/securetty
+ echo "xvc0" >> /etc/securetty
fi
#