git://git.onelab.eu
/
vsys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6cfa564
)
Create .acl file first
author
Andy Bavier
<acb@cs.princeton.edu>
Thu, 17 Apr 2008 15:31:37 +0000
(15:31 +0000)
committer
Andy Bavier
<acb@cs.princeton.edu>
Thu, 17 Apr 2008 15:31:37 +0000
(15:31 +0000)
factory/setup-link
patch
|
blob
|
history
diff --git
a/factory/setup-link
b/factory/setup-link
index
ba8cb42
..
1eedfab
100755
(executable)
--- a/
factory/setup-link
+++ b/
factory/setup-link
@@
-37,7
+37,8
@@
iptables -t mangle -A FORWARD -o $BRIDGE -j MARK --set-mark $SLICEID
### Create "grab link" script
GRAB=/vsys/grab-$ETUN0
### Create "grab link" script
GRAB=/vsys/grab-$ETUN0
-rm -f $GRAB $GRAB.acl
+echo $SLICE > $GRAB.acl
+rm -f $GRAB
cat > $GRAB <<EOF
#!/bin/sh
cat > $GRAB <<EOF
#!/bin/sh
@@
-46,12
+47,11
@@
read PID
chcontext --ctx 1 -- echo \$PID > /sys/class/net/$ETUN0/new_ns_pid
EOF
chmod +x $GRAB
chcontext --ctx 1 -- echo \$PID > /sys/class/net/$ETUN0/new_ns_pid
EOF
chmod +x $GRAB
-sleep 1
-echo $SLICE > $GRAB.acl
### Create "delete link" script
DELETE=/vsys/delete-$ETUN0
### Create "delete link" script
DELETE=/vsys/delete-$ETUN0
-rm -f $DELETE $DELETE.acl
+echo $SLICE > $DELETE.acl
+rm -f $DELETE
cat > $DELETE <<EOF
#!/bin/sh
cat > $DELETE <<EOF
#!/bin/sh
@@
-76,7
+76,5
@@
rm -f $DELETE $DELETE.acl
EOF
chmod +x $DELETE
EOF
chmod +x $DELETE
-sleep 1
-echo $SLICE > $DELETE.acl