[pve-devel] [PATCH common] Network: stop using ifconfig
Thomas Lamprecht
t.lamprecht at proxmox.com
Mon Feb 6 11:29:34 CET 2017
Am 06.02.2017 um 11:22 schrieb Wolfgang Bumiller:
> 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.
The pvereport commands should then probably be also changed from
ifconfig to the ip tool ones, else manager does depends on net-tools.
> ---
> 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);
> };
>
More information about the pve-devel
mailing list