git://git.onelab.eu
/
vsys-scripts.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
199bd36
)
support mounting pf directory to slicewith newer kernels
author
S.Çağlar Onur
<caglar@cs.princeton.edu>
Mon, 18 Oct 2010 15:03:13 +0000
(11:03 -0400)
committer
S.Çağlar Onur
<caglar@cs.princeton.edu>
Mon, 18 Oct 2010 15:03:13 +0000
(11:03 -0400)
exec/pfmount
patch
|
blob
|
history
diff --git
a/exec/pfmount
b/exec/pfmount
index
0282c76
..
ade3748
100755
(executable)
--- a/
exec/pfmount
+++ b/
exec/pfmount
@@
-1,10
+1,18
@@
#!/bin/sh
# Mount the planetflow directory in a slice
#!/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"
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 pl_netflow -- 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
fi