]> git.proxmox.com Git - pve-common.git/commitdiff
INotify: detect ifupdown2 from executable not path
authorAlexandre Derumier <aderumier@odiso.com>
Fri, 21 Feb 2020 09:28:12 +0000 (10:28 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 7 Mar 2020 15:57:33 +0000 (16:57 +0100)
Seem than addons.conf file is not removed on "apt remove ifupdown2",
so /usr/share/ifupdown2 is not removed too.

src/PVE/INotify.pm

index 0136f326bb89d93c407f4ad55ed01992a347c609..cf086f25cc40f73765ec7bcaba95fb8398351090 100644 (file)
@@ -1352,7 +1352,7 @@ sub __interface_to_string {
 
 sub write_etc_network_interfaces {
     my ($filename, $fh, $config) = @_;
 
 sub write_etc_network_interfaces {
     my ($filename, $fh, $config) = @_;
-    my $ifupdown2 = -e '/usr/share/ifupdown2';
+    my $ifupdown2 = -e '/usr/share/ifupdown2/ifupdown2';
     my $raw = __write_etc_network_interfaces($config, $ifupdown2);
     PVE::Tools::safe_print($filename, $fh, encode('UTF-8', $raw));
 }
     my $raw = __write_etc_network_interfaces($config, $ifupdown2);
     PVE::Tools::safe_print($filename, $fh, encode('UTF-8', $raw));
 }