]>
Commit | Line | Data |
---|---|---|
f653df85 PM |
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) 2022 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=170 | |
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 | |
979a8b3d | 35 | /etc/init.d/rc.d/unbound stop |
f653df85 PM |
36 | |
37 | # Remove files | |
84695e03 PM |
38 | rm -rvf \ |
39 | /lib/ld-2.* \ | |
40 | /lib/libanl-2.* \ | |
41 | /lib/libc-2.* \ | |
42 | /lib/libdl-2.* \ | |
43 | /lib/libm-2.* \ | |
44 | /lib/libmvec-2.* \ | |
45 | /lib/libnsl-2.* \ | |
46 | /lib/libnss_compat-2.* \ | |
47 | /lib/libnss_db-2.* \ | |
48 | /lib/libnss_dns-2.* \ | |
49 | /lib/libnss_files-2.* \ | |
50 | /lib/libnss_hesiod-2.* \ | |
51 | /lib/libntfs-3g.so.88* \ | |
52 | /lib/libpsx.so.2 \ | |
53 | /lib/libpthread-2.* \ | |
54 | /lib/libresolv-2.* \ | |
55 | /lib/librt-2.* \ | |
56 | /lib/libthread_db-1.0.so \ | |
57 | /lib/libutil-2.* \ | |
58 | /sbin/ifcfg \ | |
59 | /sbin/routef \ | |
60 | /sbin/rtpr \ | |
15c708c8 | 61 | /usr/bin/screen-4.* \ |
60da82e5 | 62 | /usr/bin/x86_64 \ |
84695e03 PM |
63 | /usr/lib/libbfd-2.36.* \ |
64 | /usr/lib/libbind9-9.16.2* \ | |
00e8b154 | 65 | /usr/lib/libbind9-9.16.30.so \ |
84695e03 | 66 | /usr/lib/libdnet* \ |
00e8b154 | 67 | /usr/lib/libdns-9.16.30.so \ |
84695e03 | 68 | /usr/lib/libirs-9.16.2* \ |
00e8b154 | 69 | /usr/lib/libirs-9.16.30.so \ |
84695e03 | 70 | /usr/lib/libisc-9.16.2* \ |
00e8b154 | 71 | /usr/lib/libisc-9.16.30.so \ |
84695e03 | 72 | /usr/lib/libisccc-9.16.2* \ |
00e8b154 | 73 | /usr/lib/libisccc-9.16.30.so \ |
84695e03 | 74 | /usr/lib/libisccfg-9.16.2* \ |
00e8b154 | 75 | /usr/lib/libisccfg-9.16.30.so \ |
84695e03 PM |
76 | /usr/lib/libldap-* \ |
77 | /usr/lib/libldap_r-* \ | |
78 | /usr/lib/libns-9.16.2* \ | |
00e8b154 | 79 | /usr/lib/libns-9.16.30.so \ |
84695e03 PM |
80 | /usr/lib/libopenjp2.so.2.3.* \ |
81 | /usr/lib/libpoppler.so.11* \ | |
82 | /usr/lib/perl5/site_perl/5.32.1/Bundle/LWP.pm \ | |
83 | /usr/lib/perl5/site_perl/5.32.1/File/Listing.pm \ | |
84 | /usr/lib/perl5/site_perl/5.32.1/HTML/Form.pm \ | |
85 | /usr/lib/perl5/site_perl/5.32.1/HTTP/Cookies \ | |
86 | /usr/lib/perl5/site_perl/5.32.1/HTTP/Negotiate.pm \ | |
87 | /usr/lib/perl5/site_perl/5.32.1/*-linux-thread-multi/auto/Unix/Syslog/autosplit.ix \ | |
88 | /usr/lib/perl5/site_perl/5.32.1/*-linux-thread-multi/qd.pl \ | |
89 | /usr/lib/perl5/site_perl/5.32.1/LWP/media.types \ | |
90 | /usr/lib/perl5/site_perl/5.32.1/LWP/MediaTypes.pm \ | |
91 | /usr/lib/perl5/site_perl/5.32.1/LWP/Protocol/GHTTP.pm \ | |
92 | /usr/lib/perl5/site_perl/5.32.1/LWP/Protocol/http10.pm \ | |
93 | /usr/lib/perl5/site_perl/5.32.1/LWP/Protocol/https10.pm \ | |
94 | /usr/lib/perl5/site_perl/5.32.1/WWW \ | |
95 | /usr/sbin/ovpn-ccd-convert \ | |
96 | /usr/share/xt_geoip | |
f653df85 PM |
97 | |
98 | # Extract files | |
99 | extract_files | |
100 | ||
101 | # update linker config | |
102 | ldconfig | |
103 | ||
104 | # Update Language cache | |
105 | /usr/local/bin/update-lang-cache | |
106 | ||
107 | # Filesytem cleanup | |
108 | /usr/local/bin/filesystem-cleanup | |
109 | ||
fc842bf1 PM |
110 | # Create directory for IPBlocklist feature |
111 | mkdir -pv /var/lib/ipblocklist | |
112 | chown nobody:nobody /var/lib/ipblocklist | |
113 | ||
114 | # Rebuild fcrontab from scratch | |
115 | /usr/bin/fcrontab -z | |
116 | ||
e3d8db51 MT |
117 | # Update collectd.conf |
118 | sed -i /etc/collectd.conf \ | |
119 | -e "/LoadPlugin entropy/d" | |
120 | /etc/init.d/collectd restart | |
121 | ||
f653df85 | 122 | # Start services |
979a8b3d | 123 | /etc/init.d/rc.d/unbound start |
a702353e | 124 | /etc/init.d/rc.d/suricata restart |
f653df85 | 125 | |
533cfb1b PM |
126 | # Harden mount options of /boot |
127 | sed -e -i "s@[[:space:]]*\/boot[[:space:]]*auto[[:space:]]*defaults[[:space:]]*@ \/boot auto defaults,nodev,noexec,nosuid @g" /etc/fstab | |
128 | ||
f653df85 | 129 | # This update needs a reboot... |
fc842bf1 | 130 | touch /var/run/need_reboot |
f653df85 PM |
131 | |
132 | # Finish | |
133 | /etc/init.d/fireinfo start | |
134 | sendprofile | |
135 | ||
136 | # Update grub config to display new core version | |
137 | if [ -e /boot/grub/grub.cfg ]; then | |
138 | grub-mkconfig -o /boot/grub/grub.cfg | |
139 | fi | |
140 | ||
141 | sync | |
142 | ||
143 | # Don't report the exitcode last command | |
144 | exit 0 |