]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - config/rootfiles/core/76/update.sh
fifteen: remove /var/run from fstab.
[people/teissler/ipfire-2.x.git] / config / rootfiles / core / 76 / update.sh
index 12d6b1c0fb3d1f7170d72a8de312c6e7cc866142..c572e7cc2b3df039175058aff338d6c488e2092c 100644 (file)
@@ -118,7 +118,7 @@ tar cJvf /var/ipfire/backup/core-upgrade$core_$KVER.tar.xz \
 # Check diskspace on root
 ROOTSPACE=`df / -Pk | sed "s| * | |g" | cut -d" " -f4 | tail -n 1`
 
-if [ $ROOTSPACE -lt 70000 ]; then
+if [ $ROOTSPACE -lt 100000 ]; then
        /usr/bin/logger -p syslog.emerg -t ipfire \
                "core-update-$core: ERROR cannot update because not enough free space on root."
        exit 2
@@ -175,10 +175,23 @@ esac
 rm -rf /srv/web/ipfire/html/themes/ipfire
 
 # rename /etc/modprobe.d files
-for i in $(find /etc/modprobe.d/* | grep -v ".conf")
+for i in $(find /etc/modprobe.d/* | grep -v ".conf"); do
        mv $i $i.conf
 done
 
+# Move /var/run to /run.
+if [ -L "/run" ]; then
+       rm -f /run
+fi
+
+mkdir -p /run
+if mountpoint /var/run; then
+       mount --move /var/run /run
+       rm -rf /var/run
+fi
+
+ln -svf ../run /var/run
+
 #
 #Extract files
 tar xavf /opt/pakfire/tmp/files* --no-overwrite-dir -p --numeric-owner -C /
@@ -254,6 +267,7 @@ sed -i -e "s/tty1 9600$/tty1 9600 --noclear/g" /etc/inittab
 sed -i -e "s/^proc/#proc/g" /etc/fstab
 sed -i -e "s/^sysfs/#sysfs/g" /etc/fstab
 sed -i -e "s/^devpts/#devpts/g" /etc/fstab
+sed -i -e "s|^none\s/var/run|#none     /var/run|/g" /etc/fstab
 
 # Convert udev persistent network rules
 sed -i -e "s/SYSFS{/ATTR{/g" /etc/udev/rules.d/30-persistent-network.rules
@@ -327,7 +341,7 @@ rm -rf /opt/pakfire/db/*/meta-linux-pae
 if [ ! "$(grep "^flags.* pae " /proc/cpuinfo)" == "" ]; then
        ROOTSPACE=`df / -Pk | sed "s| * | |g" | cut -d" " -f4 | tail -n 1`
        BOOTSPACE=`df /boot -Pk | sed "s| * | |g" | cut -d" " -f4 | tail -n 1`
-       if [ $BOOTSPACE -lt 8000 -o $ROOTSPACE -lt 70000 ]; then
+       if [ $BOOTSPACE -lt 9000 -o $ROOTSPACE -lt 90000 ]; then
                /usr/bin/logger -p syslog.emerg -t ipfire \
                        "core-update-$core: WARNING not enough space for pae kernel."
        else