X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=exec%2Fpfmount;h=94841efa3a8f944170cf576e2fd73cd3bef2f02c;hb=19385ecb75ad5d087c79377d5b898987e0d2c727;hp=b714b5affa79451321380135bc6e5eaa5038707c;hpb=20a6b4cccadc5f258eb638aa91ec4b45634f1025;p=vsys-scripts.git diff --git a/exec/pfmount b/exec/pfmount index b714b5a..94841ef 100755 --- a/exec/pfmount +++ b/exec/pfmount @@ -1,18 +1,16 @@ #!/bin/sh # Mount the planetflow directory in a slice -VERSION=`uname -r | awk -F"." '{print $3}'` -DEST="/vservers/$1/pf" - -if [ $VERSION -ge 27 ]; then - # FIXME: ro bind mounts and namespace... - mount | grep "on $DEST type" > /dev/null - if [ $? -eq 1 ]; then - vnamespace -e $1 -- mount -o bind /var/local/fprobe $DEST - fi -else - mount | grep "on $DEST type" > /dev/null - if [ $? -eq 1 ]; then - mount --bind /var/local/fprobe -o ro $DEST +# FIXME: if touch operation failes +if [ ! -e /etc/vservers/$1/nonamespace ]; then + touch /etc/vservers/$1/nonamespace + if [ $? -eq 0 ]; then + vserver $1 stop + vserver $1 start fi fi + +VERSION=`uname -r | awk -F"-" '{print $1;}' | awk -F"." '{print $3}'` +DEST="/vservers/$1/pf" + +mount --bind /var/local/fprobe -o ro $DEST