]> git.ipfire.org Git - ipfire-2.x.git/blame - config/rootfiles/core/177/update.sh
kernel: update to 6.1.37
[ipfire-2.x.git] / config / rootfiles / core / 177 / update.sh
CommitLineData
13183b06
MT
1#!/bin/bash
2############################################################################
3# #
4# This file is part of the IPFire Firewall. #
5# #
6# IPFire is free software; you can redistribute it and/or modify #
7# it under the terms of the GNU General Public License as published by #
8# the Free Software Foundation; either version 3 of the License, or #
9# (at your option) any later version. #
10# #
11# IPFire is distributed in the hope that it will be useful, #
12# but WITHOUT ANY WARRANTY; without even the implied warranty of #
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14# GNU General Public License for more details. #
15# #
16# You should have received a copy of the GNU General Public License #
17# along with IPFire; if not, write to the Free Software #
18# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
19# #
20# Copyright (C) 2023 IPFire-Team <info@ipfire.org>. #
21# #
22############################################################################
23#
24. /opt/pakfire/lib/functions.sh
25/usr/local/bin/backupctrl exclude >/dev/null 2>&1
26
38430234 27core=177
13183b06
MT
28
29# Remove old core updates from pakfire cache to save space...
30for (( i=1; i<=$core; i++ )); do
31 rm -f /var/cache/pakfire/core-upgrade-*-$i.ipfire
32done
33
34# Stop services
35
36# Extract files
37extract_files
38
a8c72d6f 39# Remove files
5ea68607
PM
40rm -rvf \
41 /lib/firmware/cxgb4/t4fw-1.27.1* \
42 /lib/firmware/cxgb4/t5fw-1.27.1* \
43 /lib/firmware/cxgb4/t6fw-1.27.1* \
44 /lib/firmware/intel/ice/ddp-comms/ice_comms-1.3.3* \
45 /lib/firmware/intel/ice/ddp-wireless_edge/ice_wireless_edge-1.3.7*
a8c72d6f 46
13183b06
MT
47# update linker config
48ldconfig
49
50# Update Language cache
51/usr/local/bin/update-lang-cache
52
53# Filesytem cleanup
54/usr/local/bin/filesystem-cleanup
55
56# Start services
8ebb8091 57/etc/init.d/ntp restart
1842f3dc
PM
58if [ -f /var/ipfire/proxy/enable ]; then
59 /etc/init.d/squid restart
60fi
a71450b6 61
ee947634
PM
62# Rebuild initial ramdisk to apply microcode updates
63dracut --regenerate-all --force
64KVER="xxxKVERxxx"
65case "$(uname -m)" in
66 aarch64)
67 mkimage -A arm64 -T ramdisk -C lzma -d /boot/initramfs-${KVER}-ipfire.img /boot/uInit-${KVER}-ipfire
68 # dont remove initramfs because grub need this to boot.
69 ;;
70esac
71
13183b06 72# This update needs a reboot...
5ea68607 73touch /var/run/need_reboot
13183b06
MT
74
75# Finish
76/etc/init.d/fireinfo start
77sendprofile
78
79# Update grub config to display new core version
80if [ -e /boot/grub/grub.cfg ]; then
81 grub-mkconfig -o /boot/grub/grub.cfg
82fi
83
84sync
85
86# Don't report the exitcode last command
87exit 0