mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +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:
@@ -1 +0,0 @@
|
||||
../../../../common/armv5tel/linux-initrd-rpi
|
||||
@@ -1 +0,0 @@
|
||||
../../../../common/armv5tel/linux-rpi
|
||||
@@ -1,20 +1,4 @@
|
||||
etc/system-release
|
||||
etc/issue
|
||||
etc/rc.d/init.d/acpid
|
||||
etc/rc.d/init.d/collectd
|
||||
etc/rc.d/init.d/firstsetup
|
||||
etc/rc.d/init.d/leds
|
||||
etc/rc.d/init.d/partresize
|
||||
etc/rc.d/init.d/rngd
|
||||
etc/rc.d/rc0.d/K87acpid
|
||||
etc/rc.d/rc3.d/S12acpid
|
||||
etc/rc.d/rc6.d/K87acpid
|
||||
etc/ssl/certs/ca-bundle.crt
|
||||
srv/web/ipfire/cgi-bin/entropy.cgi
|
||||
srv/web/ipfire/cgi-bin/firewall.cgi
|
||||
srv/web/ipfire/cgi-bin/fwhosts.cgi
|
||||
srv/web/ipfire/cgi-bin/ovpnmain.cgi
|
||||
srv/web/ipfire/cgi-bin/remote.cgi
|
||||
usr/lib/firewall/firewall-lib.pl
|
||||
var/ipfire/langs
|
||||
var/ipfire/qos/bin/makeqosscripts.pl
|
||||
|
||||
@@ -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
|
||||
|
||||
30
config/rootfiles/core/122/exclude
Normal file
30
config/rootfiles/core/122/exclude
Normal file
@@ -0,0 +1,30 @@
|
||||
boot/config.txt
|
||||
boot/grub/grub.cfg
|
||||
boot/grub/grubenv
|
||||
etc/alternatives
|
||||
etc/collectd.custom
|
||||
etc/default/grub
|
||||
etc/ipsec.conf
|
||||
etc/ipsec.secrets
|
||||
etc/ipsec.user.conf
|
||||
etc/ipsec.user.secrets
|
||||
etc/localtime
|
||||
etc/shadow
|
||||
etc/snort/snort.conf
|
||||
etc/ssh/ssh_config
|
||||
etc/ssh/sshd_config
|
||||
etc/ssl/openssl.cnf
|
||||
etc/sudoers
|
||||
etc/sysconfig/firewall.local
|
||||
etc/sysconfig/rc.local
|
||||
etc/udev/rules.d/30-persistent-network.rules
|
||||
srv/web/ipfire/html/proxy.pac
|
||||
var/ipfire/dma
|
||||
var/ipfire/time
|
||||
var/ipfire/ovpn
|
||||
var/lib/alternatives
|
||||
var/log/cache
|
||||
var/log/dhcpcd.log
|
||||
var/log/messages
|
||||
var/state/dhcp/dhcpd.leases
|
||||
var/updatecache
|
||||
18
config/rootfiles/core/122/filelists/files
Normal file
18
config/rootfiles/core/122/filelists/files
Normal file
@@ -0,0 +1,18 @@
|
||||
etc/system-release
|
||||
etc/issue
|
||||
etc/rc.d/init.d/acpid
|
||||
etc/rc.d/init.d/collectd
|
||||
etc/rc.d/init.d/firstsetup
|
||||
etc/rc.d/init.d/leds
|
||||
etc/rc.d/init.d/partresize
|
||||
etc/rc.d/rc0.d/K87acpid
|
||||
etc/rc.d/rc3.d/S12acpid
|
||||
etc/rc.d/rc6.d/K87acpid
|
||||
srv/web/ipfire/cgi-bin/entropy.cgi
|
||||
srv/web/ipfire/cgi-bin/firewall.cgi
|
||||
srv/web/ipfire/cgi-bin/fwhosts.cgi
|
||||
srv/web/ipfire/cgi-bin/ovpnmain.cgi
|
||||
srv/web/ipfire/cgi-bin/remote.cgi
|
||||
usr/lib/firewall/firewall-lib.pl
|
||||
var/ipfire/langs
|
||||
var/ipfire/qos/bin/makeqosscripts.pl
|
||||
1
config/rootfiles/core/122/filelists/xtables-addons
Symbolic link
1
config/rootfiles/core/122/filelists/xtables-addons
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../common/xtables-addons
|
||||
1
config/rootfiles/core/122/meta
Normal file
1
config/rootfiles/core/122/meta
Normal file
@@ -0,0 +1 @@
|
||||
DEPS=""
|
||||
128
config/rootfiles/core/122/update.sh
Normal file
128
config/rootfiles/core/122/update.sh
Normal file
@@ -0,0 +1,128 @@
|
||||
#!/bin/bash
|
||||
############################################################################
|
||||
# #
|
||||
# This file is part of the IPFire Firewall. #
|
||||
# #
|
||||
# IPFire is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
# the Free Software Foundation; either version 3 of the License, or #
|
||||
# (at your option) any later version. #
|
||||
# #
|
||||
# IPFire is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License for more details. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License #
|
||||
# along with IPFire; if not, write to the Free Software #
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||
# #
|
||||
# Copyright (C) 2018 IPFire-Team <info@ipfire.org>. #
|
||||
# #
|
||||
############################################################################
|
||||
#
|
||||
. /opt/pakfire/lib/functions.sh
|
||||
/usr/local/bin/backupctrl exclude >/dev/null 2>&1
|
||||
|
||||
core=122
|
||||
|
||||
exit_with_error() {
|
||||
# Set last succesfull installed core.
|
||||
echo $(($core-1)) > /opt/pakfire/db/core/mine
|
||||
/usr/bin/logger -p syslog.emerg -t ipfire \
|
||||
"core-update-${core}: $1"
|
||||
exit $2
|
||||
}
|
||||
|
||||
# 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
|
||||
|
||||
# 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
|
||||
|
||||
# Extract files
|
||||
extract_files
|
||||
|
||||
# update linker config
|
||||
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
|
||||
|
||||
# Finish
|
||||
/etc/init.d/fireinfo start
|
||||
sendprofile
|
||||
|
||||
# Update grub config to display new core version
|
||||
if [ -e /boot/grub/grub.cfg ]; then
|
||||
grub-mkconfig -o /boot/grub/grub.cfg
|
||||
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
|
||||
2
make.sh
2
make.sh
@@ -25,7 +25,7 @@
|
||||
NAME="IPFire" # Software name
|
||||
SNAME="ipfire" # Short name
|
||||
VERSION="2.21" # Version number
|
||||
CORE="121" # Core Level (Filename)
|
||||
CORE="122" # Core Level (Filename)
|
||||
PAKFIRE_CORE="120" # Core Level (PAKFIRE)
|
||||
GIT_BRANCH=`git rev-parse --abbrev-ref HEAD` # Git Branch
|
||||
SLOGAN="www.ipfire.org" # Software slogan
|
||||
|
||||
Reference in New Issue
Block a user