summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vserver.functions1
-rwxr-xr-xvserver.netns2
2 files changed, 3 insertions, 0 deletions
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