#!/bin/bash # include lib . /opt/lib/vbox-network CALLNAME=$(basename $0) case "$CALLNAME" in "vbox-network_start") # if the fd is set, interface already exists [ "$IF_FD" = "0" ] || { echo $IF_NAME; exit $NO_ERROR; } create_iface exit $? ;; "vbox-network_stop") delete_iface exit $? ;; *) exit $E_BAD_CALLNAME ;; esac