Start Core Update 158

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2021-05-18 13:34:15 +00:00
parent d267131be3
commit b4d83d1af3
63 changed files with 107 additions and 1 deletions

View File

@@ -1 +0,0 @@
../../../common/Canary-Stability

View File

@@ -1 +0,0 @@
../../../common/Convert-TNEF

View File

@@ -1 +0,0 @@
../../../common/Convert-UUlib

View File

@@ -1 +0,0 @@
../../../common/Crypt-PasswdMD5

View File

@@ -1 +0,0 @@
../../../common/Digest

View File

@@ -1 +0,0 @@
../../../../common/aarch64/linux

View File

@@ -1 +0,0 @@
../../../../common/aarch64/linux-initrd

View File

@@ -1 +0,0 @@
../../../../common/aarch64/lm_sensors

View File

@@ -1 +0,0 @@
../../../common/apache2

View File

@@ -1 +0,0 @@
../../../../common/armv5tel/linux-initrd-multi

View File

@@ -1 +0,0 @@
../../../../common/armv5tel/linux-multi

View File

@@ -1 +0,0 @@
../../../../common/armv5tel/lm_sensors

View File

@@ -1 +0,0 @@
../../../common/bash

View File

@@ -1 +0,0 @@
../../../common/boost

View File

@@ -1 +0,0 @@
../../../common/collectd

View File

@@ -1 +0,0 @@
../../../common/curl

View File

@@ -1 +0,0 @@
../../../common/ddns

View File

@@ -1 +0,0 @@
../../../common/dejavu-fonts-ttf

View File

@@ -1 +0,0 @@
../../../common/expat

View File

@@ -1 +0,0 @@
../../../common/file

View File

@@ -1,6 +0,0 @@
srv/web/ipfire/cgi-bin/getrrdimage.cgi
srv/web/ipfire/cgi-bin/iptables.cgi
srv/web/ipfire/html/themes/ipfire/include/css/style.css
usr/local/bin/getipstat
usr/sbin/unbound-dhcp-leases-bridge
var/ipfire/network-functions.pl

View File

@@ -1 +0,0 @@
../../../common/fuse

View File

@@ -1 +0,0 @@
../../../common/glib

View File

@@ -1 +0,0 @@
../../../../common/i586/linux

View File

@@ -1 +0,0 @@
../../../../common/i586/linux-initrd

View File

@@ -1 +0,0 @@
../../../../common/i586/lm_sensors

View File

@@ -1 +0,0 @@
../../../common/iproute2

View File

@@ -1 +0,0 @@
../../../common/iputils

View File

@@ -1 +0,0 @@
../../../common/less

View File

@@ -1 +0,0 @@
../../../common/libaio

View File

@@ -1 +0,0 @@
../../../common/libarchive

View File

@@ -1 +0,0 @@
../../../common/libcap-ng

View File

@@ -1 +0,0 @@
../../../common/libedit

View File

@@ -1 +0,0 @@
../../../common/libevent2

View File

@@ -1 +0,0 @@
../../../common/libgcrypt

View File

@@ -1 +0,0 @@
../../../common/libgpg-error

View File

@@ -1 +0,0 @@
../../../common/libjpeg

View File

@@ -1 +0,0 @@
../../../common/libupnp

View File

@@ -1 +0,0 @@
../../../common/libxcrypt

View File

@@ -1 +0,0 @@
../../../common/libxml2

View File

@@ -1 +0,0 @@
../../../common/libxslt

View File

@@ -1 +0,0 @@
../../../common/newt

View File

@@ -1 +0,0 @@
../../../common/openssh

View File

@@ -1 +0,0 @@
../../../common/pixman

View File

@@ -1 +0,0 @@
../../../common/poppler

View File

@@ -1 +0,0 @@
../../../common/poppler-data

View File

@@ -1 +0,0 @@
../../../common/ppp

View File

@@ -1 +0,0 @@
../../../common/python3-daemon

View File

@@ -1 +0,0 @@
../../../common/readline

View File

@@ -1 +0,0 @@
../../../common/sqlite

View File

@@ -1 +0,0 @@
../../../common/squid

View File

@@ -1 +0,0 @@
../../../common/sudo

View File

@@ -1 +0,0 @@
../../../../common/x86_64/linux

View File

@@ -1 +0,0 @@
../../../../common/x86_64/linux-initrd

View File

@@ -1 +0,0 @@
../../../../common/x86_64/lm_sensors

View File

@@ -1 +0,0 @@
../../../common/xfsprogs

View File

@@ -24,70 +24,14 @@
. /opt/pakfire/lib/functions.sh
/usr/local/bin/backupctrl exclude >/dev/null 2>&1
core=157
exit_with_error() {
# Set last succesfull installed core.
echo $(($core-1)) > /opt/pakfire/db/core/mine
# force fsck at next boot, this may fix free space on xfs
touch /forcefsck
# don't start pakfire again at error
killall -KILL pak_update
/usr/bin/logger -p syslog.emerg -t ipfire \
"core-update-${core}: $1"
exit $2
}
core=158
# Remove old core updates from pakfire cache to save space...
for (( i=1; i<=$core; i++ )); do
rm -f /var/cache/pakfire/core-upgrade-*-$i.ipfire
done
KVER="xxxKVERxxx"
# Backup uEnv.txt if exist
if [ -e /boot/uEnv.txt ]; then
cp -vf /boot/uEnv.txt /boot/uEnv.txt.org
fi
# Do some sanity checks.
case $(uname -r) in
*-ipfire-kirkwood)
exit_with_error "ERROR cannot update. kirkwood kernel was not supported." 1
;;
*-ipfire*)
# Ok.
;;
*)
exit_with_error "ERROR cannot update. No IPFire Kernel." 1
;;
esac
if [ -e /boot/grub/grub.conf ]; then
exit_with_error "ERROR unsupported GRUB1/pygrub found!" 1
fi
# Check diskspace on root
ROOTSPACE=`df / -Pk | sed "s| * | |g" | cut -d" " -f4 | tail -n 1`
if [ $ROOTSPACE -lt 100000 ]; then
exit_with_error "ERROR cannot update because not enough free space on root." 2
exit 2
fi
# Remove the old kernel
rm -rf /boot/System.map-*
rm -rf /boot/config-*
rm -rf /boot/ipfirerd-*
rm -rf /boot/initramfs-*
rm -rf /boot/vmlinuz-*
rm -rf /boot/uImage-*-ipfire-*
rm -rf /boot/zImage-*-ipfire-*
rm -rf /boot/uInit-*-ipfire-*
rm -rf /boot/dtb-*-ipfire-*
rm -rf /lib/modules
# Remove files
rm -rf /usr/lib/libboost*.so.1.71.0
# Stop services
@@ -103,46 +47,10 @@ ldconfig
# Filesytem cleanup
/usr/local/bin/filesystem-cleanup
# Fix file permissions changed
chmod -s /usr/bin/gpg
chmod -x \
/var/ipfire/fwhosts/icmp-types \
/var/ipfire/ovpn/ovpn-leases.db
chown -R root:root \
/var/ipfire/updatexlrator/bin \
/var/ipfire/urlfilter/bin
chown root:root \
/srv/web/ipfire/cgi-bin/cachemgr.cgi
# Delete scrubbed files
rm -f \
/usr/lib/dma-mbox-create \
/usr/lib/openssh/ssh-keysign
# Start services
/etc/init.d/sshd restart
/etc/init.d/apache restart
/etc/init.d/collectd restart
/etc/init.d/squid restart
# remove lm_sensor config after collectd was started
# to reserch sensors at next boot with updated kernel
rm -f /etc/sysconfig/lm_sensors
# 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
# This update needs a reboot...
touch /var/run/need_reboot
#touch /var/run/need_reboot
# Finish
/etc/init.d/fireinfo start