From: Wolfgang Bumiller Date: Mon, 6 Feb 2017 10:21:01 +0000 (+0100) Subject: Network: stop using ifconfig X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=commitdiff_plain;h=86330049bed1391232ae584f7301f4c368b75375 Network: stop using ifconfig We shouldn't mix different tool sets on the one hand, and on the other hand net-tools is an optional package in stretch and there's no real need for us to depend on it. --- diff --git a/src/PVE/Network.pm b/src/PVE/Network.pm index 27492b5..69051b9 100644 --- a/src/PVE/Network.pm +++ b/src/PVE/Network.pm @@ -245,7 +245,7 @@ sub tap_create { eval { disable_ipv6($iface); - PVE::Tools::run_command("/sbin/ifconfig $iface 0.0.0.0 promisc up mtu $bridgemtu"); + PVE::Tools::run_command(['/sbin/ip', 'link', 'set', $iface, 'up', 'promisc', 'on', 'mtu', $bridgemtu]); }; die "interface activation failed\n" if $@; } @@ -317,7 +317,7 @@ my $create_firewall_bridge_ovs = sub { &$activate_interface($ovsintport); # set the same mtu for ovs int port - PVE::Tools::run_command("/sbin/ifconfig $ovsintport mtu $bridgemtu"); + PVE::Tools::run_command(['/sbin/ip', 'link', 'set', $ovsintport, 'mtu', $bridgemtu]); &$bridge_add_interface($fwbr, $ovsintport); };