X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=sbin%2Fgrml-vnet;h=82aca72a8e7af97cb5dd237b6e2c3a51c99f24c7;hb=fe2884b84d7f428f8630c1ebb939312ee18ef287;hp=97e4901daa8bda137c78900911477746bb6e436f;hpb=c1a2e60ccc51e1f658def184c3371fe41500c957;p=grml-network.git diff --git a/sbin/grml-vnet b/sbin/grml-vnet index 97e4901..82aca72 100755 --- a/sbin/grml-vnet +++ b/sbin/grml-vnet @@ -93,6 +93,12 @@ while getopts "du:g:b:ah" opt; do done shift $(($OPTIND - 1)) +if [[ $# < 1 ]]; then + echo "Error: Please give at least one device" >&2 + printUsage + exit 1 +fi + if [[ $OPT_DEL_ == 'false' ]]; then if [[ $OPT_BRIDGE_ != '' && $OPT_AUTO_ == 'true' ]]; then brctl showmacs "$OPT_BRIDGE_" &>/dev/null || brctl addbr "$OPT_BRIDGE_"