]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - config/rootfiles/core/90/update.sh
core90: Remove old udev configuration
[ipfire-2.x.git] / config / rootfiles / core / 90 / update.sh
index 9a83ac403f86599c352e36371b15475b124f5889..52a8a8c757a944ede78d9525ad603d98b7362928 100644 (file)
@@ -132,10 +132,20 @@ esac
 /etc/init.d/ipsec stop
 /etc/init.d/apache stop
 
+# Drop old flag icons, before extracting the new ones.
+rm /srv/web/ipfire/html/images/flags/*
+
 #
 #Extract files
 tar xavf /opt/pakfire/tmp/files* --no-overwrite-dir -p --numeric-owner -C /
 
+#
+# restart init because glibc was updated.
+telinit u
+
+# Remove old openssl libraries
+rm -vf /usr/lib/libcrypto.so.0.9.8 /usr/lib/libssl.so.0.9.8
+
 # Check diskspace on boot
 BOOTSPACE=`df /boot -Pk | sed "s| * | |g" | cut -d" " -f4 | tail -n 1`
 
@@ -172,12 +182,35 @@ if [ ! -e "/var/ipfire/fwhosts/customgeoipgrp" ]; then
        chown nobody:nobody /var/ipfire/fwhosts/customgeoipgrp
 fi
 
+#Fix BUG10812 (openvpn server.conf has wrong collectd logfile path)
+if grep -q "status /var/log/ovpnserver.log 30" /var/ipfire/ovpn/server.conf; then
+       sed -i "s/\/var\/log\/ovpnserver.log 30/\/var\/run\/ovpnserver.log 30/" /var/ipfire/ovpn/server.conf
+fi
+
 # Download/Update GeoIP databases.
 /usr/local/bin/xt_geoip_update
 
+# Update crontab
+grep -q /usr/local/bin/xt_geoip_update /var/spool/cron/root.orig || cat <<EOF >> /var/spool/cron/root.orig
+
+# Update GeoIP database once a month.
+%monthly,random * * * [ -f "/var/ipfire/red/active" ] && /usr/local/bin/xt_geoip_update >/dev/null 2>&1
+EOF
+
+fcrontab -z &>/dev/null
+
+# Generate ddns configuration file
+sudo -u nobody /srv/web/ipfire/cgi-bin/ddns.cgi
+
+# Regenerate IPsec configuration
+sudo -u nobody /srv/web/ipfire/cgi-bin/vpnmain.cgi
+
 # Update Language cache
 perl -e "require '/var/ipfire/lang.pl'; &Lang::BuildCacheLang"
 
+# Remove old udev configuration
+rm -vf /etc/udev/rules.d/30-persistent-network.rules
+
 #
 # Start services
 #
@@ -205,6 +238,17 @@ case "$(uname -m)" in
        esac
 esac
 
+# Upadate Kernel version uEnv.txt
+if [ -e /boot/uEnv.txt ]; then
+       sed -i -e "s/KVER=.*/KVER=${KVER}/g" /boot/uEnv.txt
+fi
+
+# call user update script (needed for some arm boards)
+if [ -e /boot/pakfire-kernel-update ]; then
+       /boot/pakfire-kernel-update ${KVER}
+fi
+
+
 # Force (re)install pae kernel if pae is supported
 rm -rf /opt/pakfire/db/*/meta-linux-pae
 if [ ! "$(grep "^flags.* pae " /proc/cpuinfo)" == "" ]; then