From 5e8e9ddc4016a62ec771185c1ffa7dca740677b1 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Mon, 9 Feb 2015 03:57:38 +0100 Subject: Unset nullglob after using it. Nullglob breaks unsetting of array element in util-vserver core, so we need to unset it, after we use it. --- vserver.functions | 1 + vserver.netns | 2 ++ 2 files changed, 3 insertions(+) diff --git a/vserver.functions b/vserver.functions index 458d8fb..1f68e08 100644 --- a/vserver.functions +++ b/vserver.functions @@ -110,6 +110,7 @@ function _generateInterfaceOptions() { _netnsProcessSingleGateway "$net" netns=1 done + shopt -u nullglob # if using netns, automatically add localhost [ "$netns" != "0" ] && _netnsAddLocalhost "$VSERVER_DIR" diff --git a/vserver.netns b/vserver.netns index ce7bb52..6ad930d 100755 --- a/vserver.netns +++ b/vserver.netns @@ -96,6 +96,7 @@ if [[ "$ACTION" == "start" && -n "${_USE_NETNS}" ]]; then _processSingleNetwork add "$net" done + shopt -u nullglob fi if [[ "$ACTION" == "start" || @@ -144,6 +145,7 @@ if [ -n "${_USE_NETNS}" ]; then _processSingleNetwork remove "$net" done + shopt -u nullglob procs="$($_IP netns exec "$VSERVER_NAME" netstat -tulpenW | sed '1d;2d')" if [ -n "$procs" ]; then -- cgit v1.2.3-1-g7c22