From: Sapan Bhatia Date: Tue, 8 May 2012 19:21:43 +0000 (-0400) Subject: Fix pfmount script X-Git-Tag: vsys-scripts-0.95-39~2 X-Git-Url: http://git.onelab.eu/?p=vsys-scripts.git;a=commitdiff_plain;h=19385ecb75ad5d087c79377d5b898987e0d2c727 Fix pfmount script --- diff --git a/exec/nonamespace b/exec/nonamespace new file mode 100755 index 0000000..0422218 --- /dev/null +++ b/exec/nonamespace @@ -0,0 +1,10 @@ +#!/bin/sh +# Prevent vserver from unsharing namespaces + +if [ ! -e /etc/vservers/$1/nonamespace ]; then + touch /etc/vservers/$1/nonamespace + if [ $? -eq 0 ]; then + vserver $1 stop + vserver $1 start + fi +fi diff --git a/exec/pfmount b/exec/pfmount index d94acf1..94841ef 100755 --- a/exec/pfmount +++ b/exec/pfmount @@ -2,11 +2,11 @@ # Mount the planetflow directory in a slice # FIXME: if touch operation failes -if [ ! -e /etc/vservers/nonamespace ]; then - touch /etc/vservers/nonamespace +if [ ! -e /etc/vservers/$1/nonamespace ]; then + touch /etc/vservers/$1/nonamespace if [ $? -eq 0 ]; then - vserver pl_netflow stop - vserver pl_netflow start + vserver $1 stop + vserver $1 start fi fi