[pve-devel] [PATCH] add patch to reload after first install

Dominik Csapak d.csapak at proxmox.com
Tue Jul 6 13:42:02 CEST 2021


when installing for the first time we want to reload the network config,
since sometimes the network will not be configured, e.g. when
coming from ifupdown. this would break installing ifupdown2 over
the network (e.g. ssh)

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 ...load-network-config-on-first-install.patch | 26 +++++++++++++++++++
 debian/patches/series                         |  1 +
 2 files changed, 27 insertions(+)
 create mode 100644 debian/patches/pve/0013-postinst-reload-network-config-on-first-install.patch

diff --git a/debian/patches/pve/0013-postinst-reload-network-config-on-first-install.patch b/debian/patches/pve/0013-postinst-reload-network-config-on-first-install.patch
new file mode 100644
index 0000000..25c6851
--- /dev/null
+++ b/debian/patches/pve/0013-postinst-reload-network-config-on-first-install.patch
@@ -0,0 +1,26 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Dominik Csapak <d.csapak at proxmox.com>
+Date: Tue, 6 Jul 2021 13:11:24 +0200
+Subject: [PATCH] postinst: reload network config on first install
+
+Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
+---
+ debian/ifupdown2.postinst | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/debian/ifupdown2.postinst b/debian/ifupdown2.postinst
+index b7de485..eaade7c 100644
+--- a/debian/ifupdown2.postinst
++++ b/debian/ifupdown2.postinst
+@@ -113,6 +113,8 @@ case "$1" in
+         postinst_remove_diverts
+         if [ -f "/tmp/.ifupdown2-first-install" ]; then
+             proxmox_compatibility
++            echo "Reloading network config on first install"
++            ifreload -a
+             rm  /tmp/.ifupdown2-first-install
+         fi
+     ;;
+-- 
+2.30.2
+
diff --git a/debian/patches/series b/debian/patches/series
index 2cb57a0..c8bcffb 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -10,3 +10,4 @@ pve/0009-allow-vlan-tag-inside-vxlan-tunnel.patch
 pve/0010-postinst-rm-update-network-config-compatibility.patch
 pve/0011-d-rules-drop-now-default-with-systemd.patch
 pve/0012-d-rules-add-dh_installsystemd-override-for-compat-12.patch
+pve/0013-postinst-reload-network-config-on-first-install.patch
-- 
2.30.2






More information about the pve-devel mailing list