]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - config/rootfiles/core/185/update.sh
Merge remote-tracking branch 'ms/wsdd' into next
[people/pmueller/ipfire-2.x.git] / config / rootfiles / core / 185 / update.sh
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) 2024 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
27 core=185
28
29 # Remove old core updates from pakfire cache to save space...
30 for (( i=1; i<=$core; i++ )); do
31 rm -f /var/cache/pakfire/core-upgrade-*-$i.ipfire
32 done
33
34 # Stop services
35 /etc/init.d/ntp stop
36
37 # Extract files
38 extract_files
39
40 # Remove files
41 rm -rvf \
42 /etc/pango \
43 /lib/firmware/ath10k/WCN3990/hw1.0/notice.txt_wlanmdsp \
44 /lib/firmware/ath11k/IPQ6018/hw1.0/Notice.txt \
45 /lib/firmware/ath11k/IPQ8074/hw2.0/Notice.txt \
46 /lib/firmware/ath11k/QCA6390/hw2.0/Notice.txt \
47 /lib/firmware/ath11k/QCN9074/hw1.0/Notice.txt \
48 /lib/firmware/ath11k/WCN6855/hw2.0/Notice.txt \
49 /lib/firmware/intel-ucode/06-86-04 \
50 /lib/firmware/intel-ucode/06-86-05 \
51 /sbin/xtables-multi \
52 /srv/web/ipfire/html/themes/ipfire-rounded \
53 /usr/lib/crda/pubkeys/linville.key.pub.pem \
54 /usr/lib/grub/i386-pc/efiemu{32,64}.o \
55 /usr/lib/grub/i386-pc/verifiers.* \
56 /usr/lib/grub/i386-pc/verify.* \
57 /usr/lib/grub/x86_64-efi/shim_lock.* \
58 /usr/lib/grub/x86_64-efi/verifiers.* \
59 /usr/lib/grub/x86_64-efi/verify.* \
60 /usr/lib/snort_dynamic* \
61 /usr/local/bin/snortctrl \
62 /usr/share/usb_modeswitch/1033:0035 \
63 /usr/share/vim/vim7* \
64 /var/ipfire/geoip-functions.pl \
65 /var/ipfire/dhcpc/dhcpcd-hooks/00-linux \
66 /var/ipfire/dhcpc/dhcpcd-hooks/02-dump \
67 /var/lib/location/tmp*
68
69 # update linker config
70 ldconfig
71
72 # Update Language cache
73 /usr/local/bin/update-lang-cache
74
75 # Filesytem cleanup
76 /usr/local/bin/filesystem-cleanup
77
78 # Apply local configuration to sshd_config
79 /usr/local/bin/sshctrl
80
81 # Fix permissions of /etc/sudoers.d/
82 chmod -v 750 /etc/sudoers.d
83 chmod -v 640 /etc/sudoers.d/*
84
85 # Start services
86 telinit u
87 /etc/init.d/suricata restart
88 /etc/init.d/unbound restart
89 /etc/init.d/ntp start
90
91 # This update needs a reboot...
92 #touch /var/run/need_reboot
93
94 # Finish
95 /etc/init.d/fireinfo start
96 sendprofile
97
98 # Update grub config to display new core version
99 if [ -e /boot/grub/grub.cfg ]; then
100 grub-mkconfig -o /boot/grub/grub.cfg
101 fi
102
103 sync
104
105 # Don't report the exitcode last command
106 exit 0