X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=exec%2Fpfmount;h=b714b5affa79451321380135bc6e5eaa5038707c;hb=20a6b4cccadc5f258eb638aa91ec4b45634f1025;hp=0282c767eb108e386630e3e97e36489188483f02;hpb=daf7c3fb9235dd55bf552a625617bac121faa2e3;p=vsys-scripts.git diff --git a/exec/pfmount b/exec/pfmount index 0282c76..b714b5a 100755 --- a/exec/pfmount +++ b/exec/pfmount @@ -1,10 +1,18 @@ #!/bin/sh # Mount the planetflow directory in a slice -#mount --bind /usr/local/fprobe /vservers/$1/pf -# changed from request of Faiyaz +VERSION=`uname -r | awk -F"." '{print $3}'` DEST="/vservers/$1/pf" -mount | grep "on $DEST type" > /dev/null -if [ $? -eq 1 ]; then - mount --bind /var/local/fprobe -o ro $DEST + +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 + fi fi