new layout - make room for slice-space stuff
[vsys-scripts.git] / root-context / exec / pfmount
diff --git a/root-context/exec/pfmount b/root-context/exec/pfmount
new file mode 100755 (executable)
index 0000000..94841ef
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/sh
+# Mount the planetflow directory in a slice
+
+# 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