[pve-devel] applied: [PATCH common] Network: stop using ifconfig
Wolfgang Bumiller
w.bumiller at proxmox.com
Wed Feb 8 09:59:43 CET 2017
On Mon, Feb 06, 2017 at 11:22:22AM +0100, Wolfgang Bumiller wrote:
> 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.
> ---
> src/PVE/Network.pm | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> 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);
> };
> --
> 2.1.4
More information about the pve-devel
mailing list