From 69e779e3c1893c3d08dee98781e6b8ce9bbb81c1 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Sun, 1 Feb 2015 23:36:20 +0100 Subject: Use nullglob for all globbings. --- vserver.functions | 1 + vserver.netns | 2 ++ 2 files changed, 3 insertions(+) diff --git a/vserver.functions b/vserver.functions index 97e7b35..f35cf0c 100644 --- a/vserver.functions +++ b/vserver.functions @@ -102,6 +102,7 @@ function _generateInterfaceOptions() { # add commands for default route local netns=0 + shopt -s nullglob for net in "$VSERVER_DIR/netns/"*; do test -d "$net" || continue test ! -e "${net}/disabled" || continue diff --git a/vserver.netns b/vserver.netns index 6b7526a..9f78306 100755 --- a/vserver.netns +++ b/vserver.netns @@ -89,6 +89,7 @@ if [[ "$ACTION" == "start" && -n "${_USE_NETNS}" ]]; then $_IP netns list | grep -q "^${VSERVER_NAME}\$" || $_IP netns add "$VSERVER_NAME" $_IP netns exec "$VSERVER_NAME" $_IP link set dev lo up + shopt -s nullglob for net in "$VSERVER_DIR/netns/"*; do test -d "$net" || continue test ! -e "${net}/disabled" || continue @@ -136,6 +137,7 @@ fi ret=$? if [ -n "${_USE_NETNS}" ]; then + shopt -s nullglob for net in "${VSERVER_DIR}/netns/"*; do test -d "$net" || continue test ! -e "${net}/disabled" || continue -- cgit v1.2.3-1-g7c22