diff --git a/labs/osbash/lib/functions.ubuntu.sh b/labs/osbash/lib/functions.ubuntu.sh index acb31f21..33a73a6b 100644 --- a/labs/osbash/lib/functions.ubuntu.sh +++ b/labs/osbash/lib/functions.ubuntu.sh @@ -19,6 +19,8 @@ function config_netif { if [ "$if_type" = "dhcp" ]; then template="template-ubuntu-interfaces-dhcp" + elif [ "$if_type" = "manual" ]; then + template="template-ubuntu-interfaces-manual" else template="template-ubuntu-interfaces-static" fi diff --git a/labs/osbash/lib/osbash/functions-host.sh b/labs/osbash/lib/osbash/functions-host.sh index f007ed81..eb787dca 100644 --- a/labs/osbash/lib/osbash/functions-host.sh +++ b/labs/osbash/lib/osbash/functions-host.sh @@ -68,6 +68,8 @@ function configure_node_netifs { type=${NODE_IF_TYPE[index]} if [ "$type" = "dhcp" ]; then vm_nic_base "$vm_name" $index + elif [ "$type" = "manual" ]; then + vm_nic_std "$vm_name" $index elif [ "$type" = "static" ]; then vm_nic_std "$vm_name" $index else diff --git a/labs/osbash/lib/osbash/templates/template-ubuntu-interfaces-manual b/labs/osbash/lib/osbash/templates/template-ubuntu-interfaces-manual new file mode 100644 index 00000000..840b2ee2 --- /dev/null +++ b/labs/osbash/lib/osbash/templates/template-ubuntu-interfaces-manual @@ -0,0 +1,4 @@ +auto %IF_NAME% +iface %IF_NAME% inet manual +up ip link set dev $IFACE up +down ip link set dev $IFACE down