]> git.proxmox.com Git - ifupdown2.git/commit
fix #5197: do not run scripts ending with .dpkg-{old, new, tmp, dist}
authorStefan Hanreich <s.hanreich@proxmox.com>
Wed, 3 Jul 2024 12:56:56 +0000 (14:56 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 4 Jul 2024 09:31:23 +0000 (11:31 +0200)
commitc55b5af038f09c01e9f6e3c7135a4557d41f2768
tree984ecf95e79b282e8c34b6f1d70427e2ec81dee7
parent3863066c2ddb71a076df8fde2100343db6b3d885
fix #5197: do not run scripts ending with .dpkg-{old, new, tmp, dist}

This can lead to issue when upgrading from ifupdown to ifupdown2. The
particular issue this fixes occurs in the following scenario:

* Suppose there is a legacy Debian host with ifupdown and ifenslave
  installed that has a bond configured in /etc/network/interfaces.
* ifenslave installs a script /etc/network/if-pre-up.d/ifenslave.
* Now, an upgrade creates a second script
  /etc/network/if-pre-up.d/ifenslave.dpkg-new. As ifupdown executes
  network scripts via run-parts which ignores scripts with . in their
  name, ifenslave.dpkg-new has no effect.
* If the host switches over to ifupdown2 by installing it (removing
  ifupdown, keeping ifenslave) and reboots, the network will not come
  up:
  /etc/network/if-pre-up.d/ifenslave still exists, but is ignored
  by ifupdown2's bond addon [1]
  /etc/network/if-pre-up.d/ifenslave.dpkg-new is executed by ifupdown2
  because it executes all scripts in /etc/network/if-pre-up.d, even if
  their name contains a dot

This leads to ifreload failing on upgrades, which in turn causes
issues with the networking of upgraded hosts.

Also submitted upstream at [2]

[1] https://github.com/CumulusNetworks/ifupdown2/blob/ccdc386cfab70703b657fe7c0ffceb95448a9c2b/ifupdown2/addons/bond.py#L45
[2] https://github.com/CumulusNetworks/ifupdown2/pull/304

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
Tested-by: Friedrich Weber <f.weber@proxmox.com>
Reviewed-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
debian/patches/pve/0010-main-ignore-dpkg-files-when-running-hook-scripts.patch [new file with mode: 0644]
debian/patches/series