mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-05-05 03:18:00 +02:00
core121: split into core121 and 122
linux firmware and kernel is too large for one core update Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
@@ -39,42 +39,6 @@ for (( i=1; i<=$core; i++ )); do
|
||||
rm -f /var/cache/pakfire/core-upgrade-*-$i.ipfire
|
||||
done
|
||||
|
||||
# This update cannot be applied on ARM
|
||||
case "$(uname -a)" in
|
||||
arm*)
|
||||
exit_with_error "ERROR: Cannot update on ARM. Please re-install." 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# Do some sanity checks.
|
||||
case $(uname -r) in
|
||||
*-ipfire*)
|
||||
# Ok.
|
||||
;;
|
||||
*)
|
||||
exit_with_error "ERROR cannot update. No IPFire Kernel." 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# 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
|
||||
|
||||
# Stop services
|
||||
|
||||
@@ -85,27 +49,12 @@ extract_files
|
||||
ldconfig
|
||||
|
||||
# Update Language cache
|
||||
/usr/local/bin/update-lang-cache
|
||||
|
||||
# Remove Nagios files, if any...
|
||||
rm -rvf \
|
||||
/etc/rc.d/init.d/nagios \
|
||||
/usr/bin/nagios \
|
||||
/etc/rc.d/rc6.d/K33nagios \
|
||||
/etc/rc.d/rc3.d/off/S67nagios \
|
||||
/etc/rc.d/rc0.d/K33nagios \
|
||||
/etc/httpd/conf/conf.d/nagios.conf \
|
||||
/etc/nagios/nagios.cfg \
|
||||
/usr/bin/p1.pl \
|
||||
/usr/bin/nagiostats \
|
||||
/usr/share/nagios/ \
|
||||
/var/nagios/
|
||||
|
||||
# Start services
|
||||
/etc/init.d/apache restart
|
||||
|
||||
# This update needs a reboot...
|
||||
touch /var/run/need_reboot
|
||||
#touch /var/run/need_reboot
|
||||
|
||||
# Finish
|
||||
/etc/init.d/fireinfo start
|
||||
@@ -118,11 +67,5 @@ fi
|
||||
|
||||
sync
|
||||
|
||||
# Reload microcode
|
||||
modprobe microcode
|
||||
if [ -w "/sys/devices/system/cpu/microcode/reload" ];
|
||||
echo 1 > /sys/devices/system/cpu/microcode/reload
|
||||
fi
|
||||
|
||||
# Don't report the exitcode last command
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user