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:
845c475
)
Dynamically create delete-link script
author
Andy Bavier
<acb@cs.princeton.edu>
Fri, 11 Apr 2008 19:07:58 +0000
(19:07 +0000)
committer
Andy Bavier
<acb@cs.princeton.edu>
Fri, 11 Apr 2008 19:07:58 +0000
(19:07 +0000)
factory/setup-link
patch
|
blob
|
history
diff --git
a/factory/setup-link
b/factory/setup-link
index
4facabc
..
5851ee6
100755
(executable)
--- a/
factory/setup-link
+++ b/
factory/setup-link
@@
-47,4
+47,27
@@
EOF
chmod +x $GRAB
echo $SLICE > $GRAB.acl
chmod +x $GRAB
echo $SLICE > $GRAB.acl
+### Create "delete link" script
+DELETE=/vsys/delete-$ETUN0
+cat > $DELETE <<EOF
+#!/bin/sh
+
+# Get rid of etun devices, only need name of one of them
+echo $ETUN1 > /sys/module/etun/parameters/delif
+
+# Get rid of bridge
+ifconfig $BRIDGE down
+brctl delbr $BRIDGE
+
+# Get rid of EGRE tunnel
+ip tunnel del $EGRE
+
+# Clean up files
+rm $GRAB
+rm $DELETE
+
+EOF
+chmod +x $DELETE
+echo $SLICE > $DELETE.acl
+