Add support for non-interactive mode
Network device and parameters can be passed via environment variables
so script will create the network configuration without asking for
parameters.
Limitations - wlan and vlan configurations are not supported.
The list of parameters:
NET_DEV - name of network interface to configure.
METHOD - method of obtaining IP address. Can be dhcp|static|manual.
If both of these parameter defined then non-interactive mode is
used.
IPADDR - IP address for network interface.
NETMASK - netmask for network interface.
If method is 'static' or 'manual' then these parameters are mandatory.
GATEWAY - address of default route.
DNS - comma separated list of dns servers.
Add '--force' key to ifdown command before configuration of the interface.
It is required for interface reconfiguration.