X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=exec%2Fpfmount;h=56b660e6646202b448b7dbc12fd3f1e0351ac0c1;hb=21ca13d9d52ee58f435417e9d68489003bd7b79a;hp=ade374816cfab746aa600a78ee75223b2bcef33a;hpb=a1f4d3d73ec8ba4cb0fd135f597824dc14444872;p=vsys-scripts.git diff --git a/exec/pfmount b/exec/pfmount index ade3748..56b660e 100755 --- a/exec/pfmount +++ b/exec/pfmount @@ -1,14 +1,23 @@ #!/bin/sh # Mount the planetflow directory in a slice -VERSION=`uname -r | awk -F"." '{print $3}'` +# FIXME: if touch operation failes +if [ ! -e /etc/vservers/nonamespace ]; then + touch /etc/vservers/nonamespace + if [ $? -eq 0 ]; then + vserver pl_netflow stop + vserver pl_netflow start + fi +fi + +VERSION=`uname -r | awk -F"-" '{print $1;}' | 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 pl_netflow -- mount -o bind /var/local/fprobe $DEST + vnamespace -e $1 -- mount -o bind /var/local/fprobe $DEST fi else mount | grep "on $DEST type" > /dev/null