This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 2.x development tree".
The branch, next has been updated via 2aab3e9a333b3b765ed73607db1502a0fe8ed0d5 (commit) via c4dd9dfc46a3d0e4a0f96ce1de7606f2dd235f2b (commit) via abccd997c09825ed286a39262030cd81693e6908 (commit) via bc5037150a6fb69d1f117235f37c2f42860e1b6b (commit) via 8bd0c4b17dfdf27dc072c4032d88cf2676f6fd51 (commit) via ee0e3beb39da302fb9735b8b3846ee675192b350 (commit) via acf47bfa80a3f8234a7ef2e5ce9b8cbf4c9b0f7b (commit) via b9021f9277e83b488c27c434ea6fee3c3d85490d (commit) via d035f60c9fd81a2a9c1fdbf69262dc5bc1d3e966 (commit) via ffb37e51d4a89588d0574756120cc9c764d27161 (commit) via 4cf7c05dd857c7a2921015401e43f2d2cce7b00f (commit) via 7d38e8a94100c44102168a37bac5d5dfab060a4d (commit) via 12f462f154ef6a3637027aaf588c2b59e0ba7237 (commit) from 1c505151cb4da3ea28aba715250544a831d7139f (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 2aab3e9a333b3b765ed73607db1502a0fe8ed0d5 Author: Michael Tremer michael.tremer@ipfire.org Date: Mon Jul 1 07:55:53 2019 +0100
core135: Ship cloud-init changes
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit c4dd9dfc46a3d0e4a0f96ce1de7606f2dd235f2b Author: Michael Tremer michael.tremer@ipfire.org Date: Mon Jul 1 07:54:19 2019 +0100
Revert "Generate a VHD image"
This reverts commit ee0e3beb39da302fb9735b8b3846ee675192b350.
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit abccd997c09825ed286a39262030cd81693e6908 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Jun 21 04:54:54 2019 +0100
azure: Do not drop last byte of MAC addresses
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit bc5037150a6fb69d1f117235f37c2f42860e1b6b Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Jun 16 13:39:07 2019 +0100
Enable serial console on all Azure instances
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit 8bd0c4b17dfdf27dc072c4032d88cf2676f6fd51 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Jun 15 11:22:28 2019 +0100
cloud-init: Move detection functions into initscript function library
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit ee0e3beb39da302fb9735b8b3846ee675192b350 Author: Michael Tremer michael.tremer@ipfire.org Date: Thu Jun 13 12:18:52 2019 +0100
Generate a VHD image
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit acf47bfa80a3f8234a7ef2e5ce9b8cbf4c9b0f7b Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Jun 14 16:28:39 2019 +0000
cloud-init: Import experimental configuration script for Azure
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit b9021f9277e83b488c27c434ea6fee3c3d85490d Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Jun 14 15:42:09 2019 +0000
cloud-init: Execute setup script for Azure if needed
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit d035f60c9fd81a2a9c1fdbf69262dc5bc1d3e966 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Jun 14 15:31:35 2019 +0000
cloud-init: Add function to detect if we are running on Azure
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit ffb37e51d4a89588d0574756120cc9c764d27161 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Jun 14 15:25:40 2019 +0000
Rename AWS initscript to cloud-init
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit 4cf7c05dd857c7a2921015401e43f2d2cce7b00f Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Jun 21 04:54:47 2019 +0100
flash-image: Align image to 1MB boundary
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit 7d38e8a94100c44102168a37bac5d5dfab060a4d Author: Michael Tremer michael.tremer@ipfire.org Date: Mon Jul 1 07:52:57 2019 +0100
core135: Ship updated packages/files
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit 12f462f154ef6a3637027aaf588c2b59e0ba7237 Author: Michael Tremer michael.tremer@ipfire.org Date: Mon Jul 1 07:50:48 2019 +0100
Start Core Update 135
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
-----------------------------------------------------------------------
Summary of changes: config/rootfiles/common/aarch64/initscripts | 5 +- config/rootfiles/common/armv5tel/initscripts | 5 +- config/rootfiles/common/i586/initscripts | 5 +- config/rootfiles/common/x86_64/initscripts | 5 +- config/rootfiles/core/{134 => 135}/exclude | 0 .../{oldcore/125 => core/135}/filelists/dhcpcd | 0 config/rootfiles/core/135/filelists/files | 9 ++ .../{oldcore/101 => core/135}/filelists/nettle | 0 .../rootfiles/{oldcore/130 => core/135}/update.sh | 13 +- config/rootfiles/{core => oldcore}/134/exclude | 0 .../{core => oldcore}/134/filelists/aarch64/linux | 0 .../134/filelists/aarch64/linux-initrd | 0 .../134/filelists/armv5tel/linux-initrd-kirkwood | 0 .../134/filelists/armv5tel/linux-initrd-multi | 0 .../134/filelists/armv5tel/linux-kirkwood | 0 .../134/filelists/armv5tel/linux-multi | 0 .../rootfiles/{core => oldcore}/134/filelists/bind | 0 .../{core => oldcore}/134/filelists/files | 0 .../134/filelists/i586/intel-microcode | 0 .../{core => oldcore}/134/filelists/i586/linux | 0 .../134/filelists/i586/linux-initrd | 0 .../134/filelists/i586/openssl-sse2 | 0 .../{core => oldcore}/134/filelists/openssl | 0 .../{core => oldcore}/134/filelists/unbound | 0 .../rootfiles/{core => oldcore}/134/filelists/vim | 0 .../134/filelists/x86_64/intel-microcode | 0 .../{core => oldcore}/134/filelists/x86_64/linux | 0 .../134/filelists/x86_64/linux-initrd | 0 config/rootfiles/{core => oldcore}/134/update.sh | 0 lfs/flash-images | 2 +- lfs/initscripts | 2 +- make.sh | 2 +- src/initscripts/helper/{aws-setup => azure-setup} | 132 ++++++++++++--------- src/initscripts/system/{aws => cloud-init} | 51 ++++---- src/initscripts/system/functions | 38 ++++++ src/initscripts/system/partresize | 5 + 36 files changed, 172 insertions(+), 102 deletions(-) copy config/rootfiles/core/{134 => 135}/exclude (100%) copy config/rootfiles/{oldcore/125 => core/135}/filelists/dhcpcd (100%) create mode 100644 config/rootfiles/core/135/filelists/files copy config/rootfiles/{oldcore/101 => core/135}/filelists/nettle (100%) copy config/rootfiles/{oldcore/130 => core/135}/update.sh (93%) rename config/rootfiles/{core => oldcore}/134/exclude (100%) rename config/rootfiles/{core => oldcore}/134/filelists/aarch64/linux (100%) rename config/rootfiles/{core => oldcore}/134/filelists/aarch64/linux-initrd (100%) rename config/rootfiles/{core => oldcore}/134/filelists/armv5tel/linux-initrd-kirkwood (100%) rename config/rootfiles/{core => oldcore}/134/filelists/armv5tel/linux-initrd-multi (100%) rename config/rootfiles/{core => oldcore}/134/filelists/armv5tel/linux-kirkwood (100%) rename config/rootfiles/{core => oldcore}/134/filelists/armv5tel/linux-multi (100%) rename config/rootfiles/{core => oldcore}/134/filelists/bind (100%) rename config/rootfiles/{core => oldcore}/134/filelists/files (100%) rename config/rootfiles/{core => oldcore}/134/filelists/i586/intel-microcode (100%) rename config/rootfiles/{core => oldcore}/134/filelists/i586/linux (100%) rename config/rootfiles/{core => oldcore}/134/filelists/i586/linux-initrd (100%) rename config/rootfiles/{core => oldcore}/134/filelists/i586/openssl-sse2 (100%) rename config/rootfiles/{core => oldcore}/134/filelists/openssl (100%) rename config/rootfiles/{core => oldcore}/134/filelists/unbound (100%) rename config/rootfiles/{core => oldcore}/134/filelists/vim (100%) rename config/rootfiles/{core => oldcore}/134/filelists/x86_64/intel-microcode (100%) rename config/rootfiles/{core => oldcore}/134/filelists/x86_64/linux (100%) rename config/rootfiles/{core => oldcore}/134/filelists/x86_64/linux-initrd (100%) rename config/rootfiles/{core => oldcore}/134/update.sh (100%) copy src/initscripts/helper/{aws-setup => azure-setup} (68%) rename src/initscripts/system/{aws => cloud-init} (56%)
Difference in files: diff --git a/config/rootfiles/common/aarch64/initscripts b/config/rootfiles/common/aarch64/initscripts index cc23cd7fe..b731a70c1 100644 --- a/config/rootfiles/common/aarch64/initscripts +++ b/config/rootfiles/common/aarch64/initscripts @@ -2,11 +2,12 @@ etc/init.d #etc/rc.d #etc/rc.d/helper etc/rc.d/helper/aws-setup +etc/rc.d/helper/azure-setup etc/rc.d/helper/getdnsfromdhcpc.pl #etc/rc.d/init.d etc/rc.d/init.d/acpid etc/rc.d/init.d/apache -etc/rc.d/init.d/aws +etc/rc.d/init.d/cloud-init etc/rc.d/init.d/beep etc/rc.d/init.d/checkfs etc/rc.d/init.d/cleanfs @@ -192,7 +193,7 @@ etc/rc.d/rcsysinit.d/S60setclock etc/rc.d/rcsysinit.d/S70console etc/rc.d/rcsysinit.d/S71pakfire etc/rc.d/rcsysinit.d/S73swconfig -etc/rc.d/rcsysinit.d/S74aws +etc/rc.d/rcsysinit.d/S74cloud-init etc/rc.d/rcsysinit.d/S75firstsetup etc/rc.d/rcsysinit.d/S80localnet etc/rc.d/rcsysinit.d/S85firewall diff --git a/config/rootfiles/common/armv5tel/initscripts b/config/rootfiles/common/armv5tel/initscripts index cc23cd7fe..b731a70c1 100644 --- a/config/rootfiles/common/armv5tel/initscripts +++ b/config/rootfiles/common/armv5tel/initscripts @@ -2,11 +2,12 @@ etc/init.d #etc/rc.d #etc/rc.d/helper etc/rc.d/helper/aws-setup +etc/rc.d/helper/azure-setup etc/rc.d/helper/getdnsfromdhcpc.pl #etc/rc.d/init.d etc/rc.d/init.d/acpid etc/rc.d/init.d/apache -etc/rc.d/init.d/aws +etc/rc.d/init.d/cloud-init etc/rc.d/init.d/beep etc/rc.d/init.d/checkfs etc/rc.d/init.d/cleanfs @@ -192,7 +193,7 @@ etc/rc.d/rcsysinit.d/S60setclock etc/rc.d/rcsysinit.d/S70console etc/rc.d/rcsysinit.d/S71pakfire etc/rc.d/rcsysinit.d/S73swconfig -etc/rc.d/rcsysinit.d/S74aws +etc/rc.d/rcsysinit.d/S74cloud-init etc/rc.d/rcsysinit.d/S75firstsetup etc/rc.d/rcsysinit.d/S80localnet etc/rc.d/rcsysinit.d/S85firewall diff --git a/config/rootfiles/common/i586/initscripts b/config/rootfiles/common/i586/initscripts index c0c6cf8a9..df4f859f1 100644 --- a/config/rootfiles/common/i586/initscripts +++ b/config/rootfiles/common/i586/initscripts @@ -2,11 +2,12 @@ etc/init.d #etc/rc.d #etc/rc.d/helper etc/rc.d/helper/aws-setup +etc/rc.d/helper/azure-setup etc/rc.d/helper/getdnsfromdhcpc.pl #etc/rc.d/init.d etc/rc.d/init.d/acpid etc/rc.d/init.d/apache -etc/rc.d/init.d/aws +etc/rc.d/init.d/cloud-init etc/rc.d/init.d/beep etc/rc.d/init.d/checkfs etc/rc.d/init.d/cleanfs @@ -190,7 +191,7 @@ etc/rc.d/rcsysinit.d/S50cleanfs etc/rc.d/rcsysinit.d/S60setclock etc/rc.d/rcsysinit.d/S70console etc/rc.d/rcsysinit.d/S71pakfire -etc/rc.d/rcsysinit.d/S74aws +etc/rc.d/rcsysinit.d/S74cloud-init etc/rc.d/rcsysinit.d/S75firstsetup etc/rc.d/rcsysinit.d/S80localnet etc/rc.d/rcsysinit.d/S85firewall diff --git a/config/rootfiles/common/x86_64/initscripts b/config/rootfiles/common/x86_64/initscripts index c0c6cf8a9..df4f859f1 100644 --- a/config/rootfiles/common/x86_64/initscripts +++ b/config/rootfiles/common/x86_64/initscripts @@ -2,11 +2,12 @@ etc/init.d #etc/rc.d #etc/rc.d/helper etc/rc.d/helper/aws-setup +etc/rc.d/helper/azure-setup etc/rc.d/helper/getdnsfromdhcpc.pl #etc/rc.d/init.d etc/rc.d/init.d/acpid etc/rc.d/init.d/apache -etc/rc.d/init.d/aws +etc/rc.d/init.d/cloud-init etc/rc.d/init.d/beep etc/rc.d/init.d/checkfs etc/rc.d/init.d/cleanfs @@ -190,7 +191,7 @@ etc/rc.d/rcsysinit.d/S50cleanfs etc/rc.d/rcsysinit.d/S60setclock etc/rc.d/rcsysinit.d/S70console etc/rc.d/rcsysinit.d/S71pakfire -etc/rc.d/rcsysinit.d/S74aws +etc/rc.d/rcsysinit.d/S74cloud-init etc/rc.d/rcsysinit.d/S75firstsetup etc/rc.d/rcsysinit.d/S80localnet etc/rc.d/rcsysinit.d/S85firewall diff --git a/config/rootfiles/core/134/exclude b/config/rootfiles/core/135/exclude similarity index 100% rename from config/rootfiles/core/134/exclude rename to config/rootfiles/core/135/exclude diff --git a/config/rootfiles/core/135/filelists/dhcpcd b/config/rootfiles/core/135/filelists/dhcpcd new file mode 120000 index 000000000..1e799dabb --- /dev/null +++ b/config/rootfiles/core/135/filelists/dhcpcd @@ -0,0 +1 @@ +../../../common/dhcpcd \ No newline at end of file diff --git a/config/rootfiles/core/135/filelists/files b/config/rootfiles/core/135/filelists/files new file mode 100644 index 000000000..50bf616b0 --- /dev/null +++ b/config/rootfiles/core/135/filelists/files @@ -0,0 +1,9 @@ +etc/system-release +etc/issue +srv/web/ipfire/cgi-bin/credits.cgi +var/ipfire/langs +etc/rc.d/helper/azure-setup +etc/rc.d/init.d/cloud-init +etc/rc.d/init.d/functions +etc/rc.d/init.d/partresize +etc/rc.d/init.d/unbound diff --git a/config/rootfiles/core/135/filelists/nettle b/config/rootfiles/core/135/filelists/nettle new file mode 120000 index 000000000..f0dba7ac8 --- /dev/null +++ b/config/rootfiles/core/135/filelists/nettle @@ -0,0 +1 @@ +../../../common/nettle \ No newline at end of file diff --git a/config/rootfiles/core/135/update.sh b/config/rootfiles/core/135/update.sh new file mode 100644 index 000000000..dd79f65af --- /dev/null +++ b/config/rootfiles/core/135/update.sh @@ -0,0 +1,64 @@ +#!/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) 2019 IPFire-Team info@ipfire.org. # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh +/usr/local/bin/backupctrl exclude >/dev/null 2>&1 + +core=135 + +# 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 + +# Remove files +rm -vf \ + /etc/rc.d/init.d/aws \ + /etc/rc.d/rcsysinit.d/S74aws + +# Stop services + +# Extract files +extract_files + +# update linker config +ldconfig + +# Update Language cache +/usr/local/bin/update-lang-cache + +# Start services + +# 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 + +# Don't report the exitcode last command +exit 0 diff --git a/config/rootfiles/oldcore/134/exclude b/config/rootfiles/oldcore/134/exclude new file mode 100644 index 000000000..b22159878 --- /dev/null +++ b/config/rootfiles/oldcore/134/exclude @@ -0,0 +1,28 @@ +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/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 diff --git a/config/rootfiles/core/134/filelists/aarch64/linux b/config/rootfiles/oldcore/134/filelists/aarch64/linux similarity index 100% rename from config/rootfiles/core/134/filelists/aarch64/linux rename to config/rootfiles/oldcore/134/filelists/aarch64/linux diff --git a/config/rootfiles/core/134/filelists/aarch64/linux-initrd b/config/rootfiles/oldcore/134/filelists/aarch64/linux-initrd similarity index 100% rename from config/rootfiles/core/134/filelists/aarch64/linux-initrd rename to config/rootfiles/oldcore/134/filelists/aarch64/linux-initrd diff --git a/config/rootfiles/core/134/filelists/armv5tel/linux-initrd-kirkwood b/config/rootfiles/oldcore/134/filelists/armv5tel/linux-initrd-kirkwood similarity index 100% rename from config/rootfiles/core/134/filelists/armv5tel/linux-initrd-kirkwood rename to config/rootfiles/oldcore/134/filelists/armv5tel/linux-initrd-kirkwood diff --git a/config/rootfiles/core/134/filelists/armv5tel/linux-initrd-multi b/config/rootfiles/oldcore/134/filelists/armv5tel/linux-initrd-multi similarity index 100% rename from config/rootfiles/core/134/filelists/armv5tel/linux-initrd-multi rename to config/rootfiles/oldcore/134/filelists/armv5tel/linux-initrd-multi diff --git a/config/rootfiles/core/134/filelists/armv5tel/linux-kirkwood b/config/rootfiles/oldcore/134/filelists/armv5tel/linux-kirkwood similarity index 100% rename from config/rootfiles/core/134/filelists/armv5tel/linux-kirkwood rename to config/rootfiles/oldcore/134/filelists/armv5tel/linux-kirkwood diff --git a/config/rootfiles/core/134/filelists/armv5tel/linux-multi b/config/rootfiles/oldcore/134/filelists/armv5tel/linux-multi similarity index 100% rename from config/rootfiles/core/134/filelists/armv5tel/linux-multi rename to config/rootfiles/oldcore/134/filelists/armv5tel/linux-multi diff --git a/config/rootfiles/core/134/filelists/bind b/config/rootfiles/oldcore/134/filelists/bind similarity index 100% rename from config/rootfiles/core/134/filelists/bind rename to config/rootfiles/oldcore/134/filelists/bind diff --git a/config/rootfiles/core/134/filelists/files b/config/rootfiles/oldcore/134/filelists/files similarity index 100% rename from config/rootfiles/core/134/filelists/files rename to config/rootfiles/oldcore/134/filelists/files diff --git a/config/rootfiles/core/134/filelists/i586/intel-microcode b/config/rootfiles/oldcore/134/filelists/i586/intel-microcode similarity index 100% rename from config/rootfiles/core/134/filelists/i586/intel-microcode rename to config/rootfiles/oldcore/134/filelists/i586/intel-microcode diff --git a/config/rootfiles/core/134/filelists/i586/linux b/config/rootfiles/oldcore/134/filelists/i586/linux similarity index 100% rename from config/rootfiles/core/134/filelists/i586/linux rename to config/rootfiles/oldcore/134/filelists/i586/linux diff --git a/config/rootfiles/core/134/filelists/i586/linux-initrd b/config/rootfiles/oldcore/134/filelists/i586/linux-initrd similarity index 100% rename from config/rootfiles/core/134/filelists/i586/linux-initrd rename to config/rootfiles/oldcore/134/filelists/i586/linux-initrd diff --git a/config/rootfiles/core/134/filelists/i586/openssl-sse2 b/config/rootfiles/oldcore/134/filelists/i586/openssl-sse2 similarity index 100% rename from config/rootfiles/core/134/filelists/i586/openssl-sse2 rename to config/rootfiles/oldcore/134/filelists/i586/openssl-sse2 diff --git a/config/rootfiles/core/134/filelists/openssl b/config/rootfiles/oldcore/134/filelists/openssl similarity index 100% rename from config/rootfiles/core/134/filelists/openssl rename to config/rootfiles/oldcore/134/filelists/openssl diff --git a/config/rootfiles/core/134/filelists/unbound b/config/rootfiles/oldcore/134/filelists/unbound similarity index 100% rename from config/rootfiles/core/134/filelists/unbound rename to config/rootfiles/oldcore/134/filelists/unbound diff --git a/config/rootfiles/core/134/filelists/vim b/config/rootfiles/oldcore/134/filelists/vim similarity index 100% rename from config/rootfiles/core/134/filelists/vim rename to config/rootfiles/oldcore/134/filelists/vim diff --git a/config/rootfiles/core/134/filelists/x86_64/intel-microcode b/config/rootfiles/oldcore/134/filelists/x86_64/intel-microcode similarity index 100% rename from config/rootfiles/core/134/filelists/x86_64/intel-microcode rename to config/rootfiles/oldcore/134/filelists/x86_64/intel-microcode diff --git a/config/rootfiles/core/134/filelists/x86_64/linux b/config/rootfiles/oldcore/134/filelists/x86_64/linux similarity index 100% rename from config/rootfiles/core/134/filelists/x86_64/linux rename to config/rootfiles/oldcore/134/filelists/x86_64/linux diff --git a/config/rootfiles/core/134/filelists/x86_64/linux-initrd b/config/rootfiles/oldcore/134/filelists/x86_64/linux-initrd similarity index 100% rename from config/rootfiles/core/134/filelists/x86_64/linux-initrd rename to config/rootfiles/oldcore/134/filelists/x86_64/linux-initrd diff --git a/config/rootfiles/core/134/update.sh b/config/rootfiles/oldcore/134/update.sh similarity index 100% rename from config/rootfiles/core/134/update.sh rename to config/rootfiles/oldcore/134/update.sh diff --git a/lfs/flash-images b/lfs/flash-images index b78691e08..dcad81ab3 100644 --- a/lfs/flash-images +++ b/lfs/flash-images @@ -79,7 +79,7 @@ endif # /boot: 128MB - OFFSET # / : 1200 MB S_BOOT := $(shell echo $$(( 262144 - $(S_OFFSET) ))) -S_ROOT := 2477600 +S_ROOT := 2476032
ifeq "$(EFI)" "1" S_EFI = 65536 # 32 MB diff --git a/lfs/initscripts b/lfs/initscripts index 5ed5f9524..68cab0ba2 100644 --- a/lfs/initscripts +++ b/lfs/initscripts @@ -177,7 +177,7 @@ $(TARGET) : ln -sf ../init.d/setclock /etc/rc.d/rc6.d/K47setclock ln -sf ../init.d/console /etc/rc.d/rcsysinit.d/S70console ln -sf ../init.d/pakfire /etc/rc.d/rcsysinit.d/S71pakfire - ln -sf ../init.d/aws /etc/rc.d/rcsysinit.d/S74aws + ln -sf ../init.d/cloud-init /etc/rc.d/rcsysinit.d/S74cloud-init ln -sf ../init.d/firstsetup /etc/rc.d/rcsysinit.d/S75firstsetup ln -sf ../init.d/localnet /etc/rc.d/rcsysinit.d/S80localnet ln -sf ../init.d/firewall /etc/rc.d/rcsysinit.d/S85firewall diff --git a/make.sh b/make.sh index aca75fc71..d6f6f7147 100755 --- a/make.sh +++ b/make.sh @@ -26,7 +26,7 @@ NAME="IPFire" # Software name SNAME="ipfire" # Short name # If you update the version don't forget to update backupiso and add it to core update VERSION="2.23" # Version number -CORE="134" # Core Level (Filename) +CORE="135" # Core Level (Filename) PAKFIRE_CORE="134" # Core Level (PAKFIRE) GIT_BRANCH=`git rev-parse --abbrev-ref HEAD` # Git Branch SLOGAN="www.ipfire.org" # Software slogan diff --git a/src/initscripts/helper/azure-setup b/src/initscripts/helper/azure-setup new file mode 100644 index 000000000..86042a204 --- /dev/null +++ b/src/initscripts/helper/azure-setup @@ -0,0 +1,326 @@ +#!/bin/bash + +. /etc/sysconfig/rc +. ${rc_functions} + +# Set PATH to find our own executables +export PATH=/usr/local/sbin:/usr/local/bin:${PATH} + +get() { + local file="${1}" + + wget -qO - --header="Metadata:true" "http://169.254.169.254/metadata/instance/$%7Bfile%7D?api-version=2019-06-01&..." +} + +format_mac() { + local mac="${1,,}" + + echo "${mac:0:2}:${mac:2:2}:${mac:4:2}:${mac:6:2}:${mac:8:2}:${mac:10:2}" +} + +to_address() { + local n="${1}" + + local o1=$(( (n & 0xff000000) >> 24 )) + local o2=$(( (n & 0xff0000) >> 16 )) + local o3=$(( (n & 0xff00) >> 8 )) + local o4=$(( (n & 0xff) )) + + printf "%d.%d.%d.%d\n" "${o1}" "${o2}" "${o3}" "${o4}" +} + +to_integer() { + local address="${1}" + + local integer=0 + + local i + for i in ${address//./ }; do + integer=$(( (integer << 8) + i )) + done + + printf "%d\n" "${integer}" +} + +prefix2netmask() { + local prefix=${1} + + local zeros=$(( 32 - prefix )) + local netmask=0 + + local i + for (( i=0; i<${zeros}; i++ )); do + netmask=$(( (netmask << 1) ^ 1 )) + done + + to_address "$(( netmask ^ 0xffffffff ))" +} + +import_azure_configuration() { + local instance_id="$(get compute/vmId)" + + boot_mesg "Importing Microsoft Azure configuration for instance ${instance_id}..." + + # Store instance ID + echo "${instance_id}" > /var/run/azure-instance-id + + # Initialise system settings + local hostname=$(get compute/name) + + # Set hostname + if ! grep -q "^HOSTNAME=" /var/ipfire/main/settings; then + echo "HOSTNAME=${hostname%%.*}" >> /var/ipfire/main/settings + fi + + # Set domainname + if ! grep -q "^DOMAINNAME=" /var/ipfire/main/settings; then + echo "DOMAINNAME=${hostname#*.}" >> /var/ipfire/main/settings + fi + + # Import SSH keys for setup user + local line + for line in $(get "compute/publicKeys/"); do + # Remove trailing slash + local key_no="${line////}" + + # Get the path where this key should be installed + local path="$(get "compute/publicKeys/${key_no}/path")" + local key="$(get "compute/publicKeys/${key_no}/keyData")" + + local user + if [[ "${path}" =~ ^/home ]]; then + user="${path:6}" + user="${user%%/*}" + else + # Cannot process this user + continue + fi + + # Create user if it does not exist + if ! getent passwd "${user}" &>/dev/null; then + useradd "${user}" -s /usr/bin/run-setup -g nobody -m + + # Unlock the account + usermod -p "x" "${user}" + fi + + if [ -n "${key}" ] && ! grep -q "^${key}$" "${path}" 2>/dev/null; then + local dir="$(dirname "${path}")" + + # Install directory + mkdir -p "${dir}" + chmod 700 "${dir}" + chown "${user}.nobody" "${dir}" + + # Install the key + echo "${key}" >> "${path}" + chmod 600 "${path}" + chown "${user}.nobody" "${path}" + fi + done + + # Download the user-data script only on the first boot + if [ ! -e "/var/ipfire/main/firstsetup_ok" ]; then + # Download user-data + local user_data="$(get customData)" + + # Save user-data script to be executed later + if [ "${user_data:0:2}" = "#!" ]; then + echo "${user_data}" > /tmp/azure-user-data.script + chmod 700 /tmp/azure-user-data.script + + # Run the user-data script + local now="$(date -u +"%s")" + /tmp/azure-user-data.script &>/var/log/user-data.log.${now} + + # Delete the script right away + rm /tmp/azure-user-data.script + fi + fi + + # Import any DNS server settings + eval $(/usr/local/bin/readhash <(grep -E "^DNS([0-9])=" /var/ipfire/ethernet/settings 2>/dev/null)) + + # Import network configuration + # After this, no network connectivity will be available from this script due to the + # renaming of the network interfaces for which they have to be shut down + local config_type=1 + : > /var/ipfire/ethernet/settings + + local device_number + for device_number in $(get network/interface); do + # Remove trailing slash + device_number="${device_number////}" + + local mac="$(get "network/interface/${device_number}/macAddress")" + mac="$(format_mac "${mac}")" + + # First IPv4 address + local ipv4_address="$(get "network/interface/${device_number}/ipv4/ipAddress/0/privateIpAddress")" + local ipv4_address_num="$(to_integer "${ipv4_address}")" + local prefix="$(get "network/interface/${device_number}/ipv4/subnet/0/prefix")" + local netmask="$(prefix2netmask "${prefix}")" + local netmask_num="$(to_integer "${netmask}")" + + # Calculate the network and broadcast addresses + local netaddress="$(get "network/interface/${device_number}/ipv4/subnet/0/address")" + local netaddress_num="$(to_integer "${netaddress}")" + local broadcast="$(to_address $(( ipv4_address_num | (0xffffffff ^ netmask_num) )))" + + case "${device_number}" in + # RED + 0) + local interface_name="red0" + + # The gateway is always the first IP address in the subnet + local gateway="$(to_address $(( netaddress_num + 1 )))" + + # Microsoft uses a special IP address for DNS + # https://blogs.msdn.microsoft.com/mast/2015/05/18/what-is-the-ip-address-168-... + local dns1="168.63.129.16" + local dns2= + + ( + echo "RED_TYPE=STATIC" + echo "RED_DEV=${interface_name}" + echo "RED_MACADDR=${mac}" + echo "RED_DESCRIPTION='${interface_id}'" + echo "RED_ADDRESS=${ipv4_address}" + echo "RED_NETMASK=${netmask}" + echo "RED_NETADDRESS=${netaddress}" + echo "RED_BROADCAST=${broadcast}" + echo "DEFAULT_GATEWAY=${gateway}" + echo "DNS1=${DNS1:-${dns1}}" + echo "DNS2=${DNS2:-${dns2}}" + ) >> /var/ipfire/ethernet/settings + + # Import aliases for RED + local address_no + for address_no in $(get "network/interface/0/ipv4/ipAddress"); do + # Remove trailing slash + address_no="${address_no////}" + + # Skip the first address + [ "${address_no}" = "0" ] && continue + + # Fetch the IP address + local alias="$(get "network/interface/0/ipv4/ipAddress/${address_no}/privateIpAddress")" + echo "${alias},on," + done > /var/ipfire/ethernet/aliases + ;; + + # GREEN + 1) + local interface_name="green0" + + ( + echo "GREEN_DEV=${interface_name}" + echo "GREEN_MACADDR=${mac}" + echo "GREEN_DESCRIPTION='${interface_id}'" + echo "GREEN_ADDRESS=${ipv4_address}" + echo "GREEN_NETMASK=${netmask}" + echo "GREEN_NETADDRESS=${netaddress}" + echo "GREEN_BROADCAST=${broadcast}" + ) >> /var/ipfire/ethernet/settings + ;; + + # ORANGE + 2) + local interface_name="orange0" + config_type=2 + + ( + echo "ORANGE_DEV=${interface_name}" + echo "ORANGE_MACADDR=${mac}" + echo "ORANGE_DESCRIPTION='${interface_id}'" + echo "ORANGE_ADDRESS=${ipv4_address}" + echo "ORANGE_NETMASK=${netmask}" + echo "ORANGE_NETADDRESS=${netaddress}" + echo "ORANGE_BROADCAST=${broadcast}" + ) >> /var/ipfire/ethernet/settings + ;; + esac + done + + # Save CONFIG_TYPE + echo "CONFIG_TYPE=${config_type}" >> /var/ipfire/ethernet/settings + + # Actions performed only on the very first start + if [ ! -e "/var/ipfire/main/firstsetup_ok" ]; then + # Enable SSH + sed -e "s/ENABLE_SSH=.*/ENABLE_SSH=on/g" -i /var/ipfire/remote/settings + + # Disable SSH password authentication + sed -e "s/^ENABLE_SSH_PASSWORDS=.*/ENABLE_SSH_PASSWORDS=off/" -i /var/ipfire/remote/settings + + # Enable SSH key authentication + sed -e "s/^ENABLE_SSH_KEYS=.*/ENABLE_SSH_KEYS=on/" -i /var/ipfire/remote/settings + + # Apply SSH settings + /usr/local/bin/sshctrl + + # Mark SSH to start immediately (but not right now) + touch /var/ipfire/remote/enablessh + chown nobody:nobody /var/ipfire/remote/enablessh + + # Firewall rules for SSH and WEBIF + ( + echo "1,ACCEPT,INPUTFW,ON,std_net_src,ALL,ipfire,RED1,,TCP,,,ON,,,cust_srv,SSH,,,,,,,,,,,00:00,00:00,,AUTO,,dnat,,,,,second" + echo "2,ACCEPT,INPUTFW,ON,std_net_src,ALL,ipfire,RED1,,TCP,,,ON,,,TGT_PORT,444,,,,,,,,,,,00:00,00:00,,AUTO,,dnat,,,,,second" + ) >> /var/ipfire/firewall/input + + # This script has now completed the first steps of setup + touch /var/ipfire/main/firstsetup_ok + fi + + # All done + echo_ok +} + +case "${reason}" in + PREINIT) + # Bring up the interface + ip link set "${interface}" up + ;; + + BOUND|RENEW|REBIND|REBOOT) + # Remove any previous IP addresses + ip addr flush dev "${interface}" + + # Add (or re-add) the new IP address + ip addr add "${new_ip_address}/${new_subnet_mask}" dev "${interface}" + + # Add the default route + ip route add default via "${new_routers}" + + # Setup DNS + for domain_name_server in ${new_domain_name_servers}; do + echo "nameserver ${domain_name_server}" + done > /etc/resolv.conf + + # The system is online now + touch /var/ipfire/red/active + + # Import Azure configuration + import_azure_configuration + ;; + + EXPIRE|FAIL|RELEASE|STOP) + # The system is no longer online + rm -f /var/ipfire/red/active + + # Remove all IP addresses + ip addr flush dev "${interface}" + + # Shut down the interface + ip link set "${interface}" down + ;; + + *) + echo "Unhandled reason: ${reason}" >&2 + exit 2 + ;; +esac + +# Terminate +exit 0 diff --git a/src/initscripts/system/aws b/src/initscripts/system/cloud-init similarity index 56% rename from src/initscripts/system/aws rename to src/initscripts/system/cloud-init index b22af7573..79a762b2d 100644 --- a/src/initscripts/system/aws +++ b/src/initscripts/system/cloud-init @@ -1,37 +1,22 @@ #!/bin/sh ######################################################################## -# Begin $rc_base/init.d/aws +# Begin $rc_base/init.d/cloud-init ########################################################################
. /etc/sysconfig/rc . ${rc_functions}
-# https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/identify_ec2_instances.h... -running_on_ec2() { - local uuid - - # Check if the hypervisor UUID starts with ec2 - if [ -r "/sys/hypervisor/uuid" ]; then - uuid=$(</sys/hypervisor/uuid) - - [ "${uuid:0:3}" = "ec2" ] && return 0 - fi - - # Check if the DMI product UUID starts with EC2 - if [ -r "/sys/devices/virtual/dmi/id/product_uuid" ]; then - uuid=$(</sys/devices/virtual/dmi/id/product_uuid) - - [ "${uuid:0:3}" = "EC2" ] && return 0 - fi - - # We are not running on AWS EC2 - return 1 -} - case "${1}" in start) - # Do nothing if we are not running on AWS EC2 - running_on_ec2 || exit 0 + # Check if we are running in the cloud + if running_on_ec2; then + scriptname="/etc/rc.d/helper/aws-setup" + elif running_on_azure; then + scriptname="/etc/rc.d/helper/azure-setup" + else + # This system is not running in the cloud + exit 0 + fi
# Find the first interface to use for i in /sys/class/net/red* /sys/class/net/eth* \ @@ -56,10 +41,10 @@ case "${1}" in fi
# Run a DHCP client and set up the system accordingly - dhclient -sf /etc/rc.d/helper/aws-setup "${intf}" + dhclient -sf "${scriptname}" "${intf}"
# End DHCP client immediately - dhclient -sf /etc/rc.d/helper/aws-setup -r "${intf}" &>/dev/null + dhclient -sf "${scriptname}" -r "${intf}" &>/dev/null
# Rename network devices udevadm trigger --action="add" --subsystem-match="net" @@ -68,11 +53,19 @@ case "${1}" in ;;
status) + # Check Amazon if running_on_ec2; then echo "This system is running on AWS EC2" exit 0 + + # Check Microsoft + elif running_on_azure; then + echo "This system is running on Microsoft Azure" + exit 0 + + # The rest else - echo "This system is NOT running on AWS EC2" + echo "This system is NOT running in the cloud" exit 1 fi ;; @@ -83,4 +76,4 @@ case "${1}" in ;; esac
-# End $rc_base/init.d/aws +# End $rc_base/init.d/cloud-init diff --git a/src/initscripts/system/functions b/src/initscripts/system/functions index c00f65922..2870729a5 100644 --- a/src/initscripts/system/functions +++ b/src/initscripts/system/functions @@ -784,4 +784,42 @@ umount_ramdisk() { rm -rf "${path_tmpfs}" }
+# https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/identify_ec2_instances.h... +running_on_ec2() { + local uuid + + # Check if the hypervisor UUID starts with ec2 + if [ -r "/sys/hypervisor/uuid" ]; then + uuid=$(</sys/hypervisor/uuid) + + [ "${uuid:0:3}" = "ec2" ] && return 0 + fi + + # Check if the DMI product UUID starts with EC2 + if [ -r "/sys/devices/virtual/dmi/id/product_uuid" ]; then + uuid=$(</sys/devices/virtual/dmi/id/product_uuid) + + [ "${uuid:0:3}" = "EC2" ] && return 0 + fi + + # We are not running on AWS EC2 + return 1 +} + +running_on_azure() { + # Check if the vendor is Microsoft + if [ -r "/sys/devices/virtual/dmi/id/sys_vendor" ] && \ + [ "$(</sys/devices/virtual/dmi/id/sys_vendor)" = "Microsoft Corporation" ]; then + # Check if this product is a "Virtual Machine" + if [ -r "/sys/devices/virtual/dmi/id/product_name" ] && \ + [ "$(</sys/devices/virtual/dmi/id/product_name)" = "Virtual Machine" ]; then + # Yes, we are running on Azure + return 0 + fi + fi + + # We are not running on Azure + return 1 +} + # End $rc_base/init.d/functions diff --git a/src/initscripts/system/partresize b/src/initscripts/system/partresize index e2df11ee0..0c2866c0b 100644 --- a/src/initscripts/system/partresize +++ b/src/initscripts/system/partresize @@ -41,6 +41,11 @@ case "${1}" in ;; esac
+ # Enable the serial console on all systems on Azure + if running_on_azure; then + scon="on" + fi + mount /boot > /dev/null if [ -e /boot/grub/grub.cfg ]; then # swtich permanent to serial console if it was selected on first boot
hooks/post-receive -- IPFire 2.x development tree