Revision bea1eb60

b/kvm-ifdown-custom
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
GANETI_INSTANCE_NAME=$INSTANCE
10
get_info
11

  
12
if [ "$MODE" = "routed" ]; then
13
  TABLE=$LINK
14
  INDEV=$INTERFACE
15
elif [ "$MODE" = "bridged" ]; then
16
  brctl delif $BRIDGE $INTERFACE
17
  INDEV=$BRIDGE
18
fi
19

  
20

  
21
for tag in $NETWORK_TAGS; do
22
  case $tag in
23
  $IP_LESS_ROUTED_TAG)
24
    try clear_routed_setup_ipv4
25
    try clear_routed_setup_ipv6
26
    try clear_routed_setup_firewall
27
  ;;
28
  $NFDHCPD_TAG)
29
    try clear_nfdhcpd
30
  ;;
31
  $MAC_FILTERED_TAG)
32
    try clear_ebtables
33
  ;;
34
  esac
35
done
36

  
37
exit 0

Also available in: Unified diff