]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - config/rootfiles/core/66/update.sh
Merge remote-tracking branch 'ms/axel-fixperms' into next
[people/teissler/ipfire-2.x.git] / config / rootfiles / core / 66 / update.sh
index e48c6731b84f60e14636cf79c06f567c831f9a2f..d764c4322b46ed081909e1c6a791bfc439bb33b0 100644 (file)
@@ -17,7 +17,7 @@
 # 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>.                        #
 #                                                                          #
 ############################################################################
 #
@@ -78,7 +78,7 @@ fi
 
 #
 #
-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
@@ -111,10 +111,11 @@ add_to_backup usr/share/terminfo
 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
@@ -126,6 +127,9 @@ if [ $ROOTSPACE -lt 70000 ]; then
        exit 2
 fi
 
+# Add user nobody to group squid.
+usermod -a -G squid nobody
+
 echo
 echo Update Kernel to $KVER ...
 #
@@ -171,6 +175,8 @@ esac
 /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
@@ -182,6 +188,9 @@ rm -rf /lib/libncurses*
 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 /
@@ -201,6 +210,7 @@ if [ $BOOTSPACE -lt 1000 ]; then
                * )
                        /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
@@ -213,9 +223,25 @@ telinit u
 # 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
@@ -268,7 +294,8 @@ case $(uname -m) in
                #
                # 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
 #
@@ -301,8 +328,8 @@ if [ ! "$(grep "^flags.* pae " /proc/cpuinfo)" == "" ]; then
                        "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
 
@@ -310,7 +337,9 @@ 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
 
 #