root / kvm-ifdown-custom @ 263fe009
History | View | Annotate | Download (630 Bytes)
1 |
#!/bin/bash |
---|---|
2 |
|
3 |
# This is an example of a Ganeti kvm ifup script that configures network |
4 |
# interfaces based on the initial deployment of the Okeanos project |
5 |
|
6 |
source /etc/default/snf-network |
7 |
source /usr/lib/snf-network/common.sh |
8 |
|
9 |
get_info |
10 |
|
11 |
if [ "$MODE" = "routed" ]; then |
12 |
:; |
13 |
elif [ "$MODE" = "bridged" ]; then |
14 |
brctl delif $BRIDGE $INTERFACE |
15 |
fi |
16 |
|
17 |
|
18 |
for tag in $NETWORK_TAGS; do |
19 |
case $tag in |
20 |
$IP_LESS_ROUTED_TAG) |
21 |
try clear_routed_setup_ipv4 |
22 |
try clear_routed_setup_ipv6 |
23 |
try clear_routed_setup_firewall |
24 |
;; |
25 |
$NFDHCPD_TAG) |
26 |
try clear_nfdhcpd |
27 |
;; |
28 |
$MAC_FILTERED_TAG) |
29 |
try clear_ebtables |
30 |
;; |
31 |
esac |
32 |
done |
33 |
|
34 |
exit 0 |