public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH] add patch to reload after first install
Date: Tue,  6 Jul 2021 13:42:02 +0200	[thread overview]
Message-ID: <20210706114202.936811-1-d.csapak@proxmox.com> (raw)

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@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@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@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





             reply	other threads:[~2021-07-06 11:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-06 11:42 Dominik Csapak [this message]
2021-07-06 12:01 ` [pve-devel] applied: " Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210706114202.936811-1-d.csapak@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal