From d721f910b13e71fa1c39afdc2b43d9058d9899f8 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Sun, 8 Feb 2015 23:59:46 +0100 Subject: Use spline-netns folder, to not collidate with default netns handling. --- vnamespace.netns | 2 +- vserver.functions | 2 +- vserver.netns | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/vnamespace.netns b/vnamespace.netns index d2935f8..57e8881 100755 --- a/vnamespace.netns +++ b/vnamespace.netns @@ -35,7 +35,7 @@ do esac done -if [[ -n "$VSERVER_NAME" && -d "${VSERVER_DIR}/netns/" ]]; then +if [[ -n "$VSERVER_NAME" && -d "${VSERVER_DIR}/spline-netns/" ]]; then exec $_IP netns exec "$VSERVER_NAME" /usr/sbin/vnamespace "${ARGS[@]}" fi diff --git a/vserver.functions b/vserver.functions index f35cf0c..458d8fb 100644 --- a/vserver.functions +++ b/vserver.functions @@ -103,7 +103,7 @@ function _generateInterfaceOptions() { # add commands for default route local netns=0 shopt -s nullglob - for net in "$VSERVER_DIR/netns/"*; do + for net in "$VSERVER_DIR/spline-netns/"*; do test -d "$net" || continue test ! -e "${net}/disabled" || continue diff --git a/vserver.netns b/vserver.netns index 9f78306..ce7bb52 100755 --- a/vserver.netns +++ b/vserver.netns @@ -78,7 +78,7 @@ NETNS=() _setVserverDir "$VSERVER_NAME" -[ -d "${VSERVER_DIR}/netns/" ] && _USE_NETNS="1" +[ -d "${VSERVER_DIR}/spline-netns/" ] && _USE_NETNS="1" if [[ "$ACTION" == "start" && -n "${_USE_NETNS}" ]]; then pushd "$VSERVER_DIR" >/dev/null @@ -90,7 +90,7 @@ if [[ "$ACTION" == "start" && -n "${_USE_NETNS}" ]]; then $_IP netns exec "$VSERVER_NAME" $_IP link set dev lo up shopt -s nullglob - for net in "$VSERVER_DIR/netns/"*; do + for net in "$VSERVER_DIR/spline-netns/"*; do test -d "$net" || continue test ! -e "${net}/disabled" || continue @@ -138,7 +138,7 @@ ret=$? if [ -n "${_USE_NETNS}" ]; then shopt -s nullglob - for net in "${VSERVER_DIR}/netns/"*; do + for net in "${VSERVER_DIR}/spline-netns/"*; do test -d "$net" || continue test ! -e "${net}/disabled" || continue -- cgit v1.2.3-1-g7c22