INotify: detect ifupdown2 from executable not path

Seem than addons.conf file is not removed on "apt remove ifupdown2",
so /usr/share/ifupdown2 is not removed too.
This commit is contained in:
Alexandre Derumier 2020-02-21 10:28:12 +01:00 committed by Thomas Lamprecht
parent d34d739328
commit bc6713dfff

View File

@ -1352,7 +1352,7 @@ sub __interface_to_string {
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));
}