Revision d2b16e51

b/conf/cluster.conf
1
NODEGROUPS="default"
2

  
3
NODES="dev88 dev89"
b/conf/infra.conf
1
ROUTER=dev88
2
ROUTER_MAC=e4:11:5b:b2:8d:ca
3
MAC_MASK=ff:ff:ff:0:0:0
4

  
5
PUBLIC_INTERFACE=eth0
6
PUBLIC_VLAN=eth0.201
7
PUBLIC_BRIDGE=br0
8
PRIVATE_VLAN=eth0.2990
9
PRIVATE_BRIDGE=br2990
10
MASQ_VLAN=eth0.2991
11
MASQ_BRIDGE=br2991
12

  
b/conf/snf-network.conf
1
SHAREDDIR=/home/dimara/snf-network
b/configure-interfaces
1 1
#!/bin/bash
2 2

  
3
source /etc/default/snf-network
3
DEFAULT=/etc/default/snf-network
4

  
5
source $DEFAULT
6
source $CONF
7
source $INFRA
4 8

  
5 9
HOSTNAME=$(hostname)
6 10

  
7 11

  
8 12
INTERFACES=$SHAREDDIR/interfaces/$HOSTNAME
9
INFRA=$SHAREDDIR/infra/$HOSTNAME
13
HOSTINFRA=$SHAREDDIR/infra/$HOSTNAME
10 14

  
11
if [ -e $INFRA ]; then
12
  source $INFRA
15
if [ -e "$HOSTINFRA" ]; then
16
  source $HOSTINFRA
13 17
fi
14 18

  
15 19
if [ -e /proc/sys/net/ipv4/conf/$PUBLIC_VLAN  -o \
......
26 30
  exit 1
27 31
fi
28 32

  
33
PUBLIC_MAC=$(ip link show $PUBLIC_INTERFACE | grep link/ether | awk '{print $2}')
34

  
35

  
29 36

  
30 37
cat > $INTERFACES<<EOF
31 38
#auto $PUBLIC_BRIDGE
......
33 40
#  bridge_ports $PUBLIC_INTERFACE
34 41
#  bridge_stp off
35 42
#  bridge_fd 2
43
#  post-up ip link set $PUBLIC_BRIDGE address $PUBLIC_MAC 
36 44

  
37 45
auto $PUBLIC_VLAN
38 46
iface $PUBLIC_VLAN inet manual
......
45 53
  bridge_ports $PRIVATE_VLAN
46 54
  bridge_stp off
47 55
  bridge_fd 2
56
  post-up ip link set $PRIVATE_BRIDGE address $PUBLIC_MAC 
48 57

  
49 58
auto $MASQ_VLAN
50 59
iface $MASQ_VLAN inet manual
......
54 63
  bridge_ports $MASQ_VLAN
55 64
  bridge_stp off
56 65
  bridge_fd 2
66
  post-up ip link set $MASQ_BRIDGE address $PUBLIC_MAC 
57 67
EOF
58 68

  
59 69

  
b/hooks/group-modify-post.d/snf-network
2 2

  
3 3
source /etc/default/snf-network
4 4

  
5
GROUP=$GANETI_GROUP_NAME
5
source $CONF
6 6

  
7
GROUP=$GANETI_GROUP_NAME
7 8
ACTION=$GANETI_GROUP_NETWORK_ACTION
8 9
NETWORK=$GANETI_GROUP_NETWORK_NAME
9 10
MODE=$GANETI_GROUP_NETWORK_MODE
10 11
LINK=$GANETI_GROUP_NETWORK_LINK
11 12

  
12

  
13

  
14
if [ -z $ACTION ]; then
15
  exit 0
16
fi
13
HOSTNAME=$(hostname)
17 14

  
18 15
NETFILE=$SHAREDDIR/networks/$NETWORK
16
GROUPMAPFILE=$SHAREDDIR/mappings/$NETWORK-$GROUP
17
NODEMAPFILE=$SHAREDDIR/mappings/$NETWORK-$HOSTNAME
18
NODEINFRAFILE=$SHAREDDIR/infra/$HOSTNAME
19 19

  
20
MAPFILE=$SHAREDDIR/mappings/$NETWORK-$GROUP
20
RT_TABLES=/etc/iproute2/rt_tables
21 21

  
22
function set_rt_table {
23
  ID=$(sed  -n '/^$/ { =; q}' /etc/iproute2/rt_tables)
24
  if [ -z $ID ]; then
25
    ID=$(wc -l /etc/iproute2/rt_tables)
26
    echo $((ID+1)) rt_$NETWORK > /etc/iproute2/rt_tables
27
  else
28
    sed -i '1,/^$/ s/^$/'"$ID"' rt_'"$NETWORK"'/' /etc/iproute2/rt_tables
29
  fi
30
}
22
source $NODEINFRAFILE
23
source $NETFILE
31 24

  
25
if [ -z "$ACTION" ]; then
26
  exit 0
27
fi
32 28

  
33 29

  
34
if [ $ACTION == "add" ]; then
35
  if [ $MODE == "routed" ]; then 
30
if [ "$ACTION" == "add" ]; then
31
  if [ "$MODE" == "routed" ]; then 
36 32
    VLAN=$LINK
37
    if [ $TYPE == "public" ]; then
33
    TABLE=rt_$NETWORK
34
    if [ "$TYPE" == "public" ]; then
38 35
      ARP_IP=$(ipcalc $SUBNET | grep HostMax | awk '{print $2}')
39 36
      
40 37
      ip link set $VLAN up
41 38

  
42 39
      echo 1 > "/proc/sys/net/ipv4/conf/$VLAN/proxy_arp"
43 40

  
44
      set_rt_table
41
      ID=$(wc -l < $RT_TABLES)
42
      echo $((ID+1)) $TABLE >> $RT_TABLES
45 43

  
46
      ip rule add iif $VLAN table rt_$NETWORK
44
      ip rule add iif $VLAN table $TABLE
47 45

  
48 46
      ip route add $SUBNET dev $VLAN table main 
49 47

  
50
      ip route add $SUBNET dev $VLAN table rt_$NETWORK
51
      ip route add default via $GATEWAY dev $VLAN table rt_$NETWORK
48
      ip route add $SUBNET dev $VLAN table $TABLE
49
      ip route add default via $GATEWAY dev $VLAN table $TABLE
52 50
      
53 51
      echo 1 > /proc/sys/net/ipv4/conf/all/forwarding
54 52

  
......
58 56

  
59 57

  
60 58

  
61
  if [ $MODE == "bridged" ]; then
59
  if [ "$MODE" == "bridged" ]; then
62 60
    BRIDGE=$LINK
63
    if [ ! -z $GATEWAY ]; then
64
      if [ $TYPE == "private" ]; then 
65
        if [ $(hostname) == $ROUTER ]; then
61
    if [ ! -z "$GATEWAY" ]; then
62
      if [ "$TYPE" == "private" ]; then 
63
        if [ "$HOSTNAME" == "$ROUTER" ]; then
66 64
          NETMASK=$(ipcalc $SUBNET | grep Netmask | awk '{print $4}')
67 65
          ip addr add $GATEWAY/$NETMASK dev $BRIDGE
68 66
          iptables -t nat -A POSTROUTING -s $SUBNET \! -d 192.168.0.0/16 -j MASQUERADE
......
71 69
    fi
72 70
  fi
73 71
  
74
  cat > $MAPFILE <<EOF
75
MODE=$MODE
76
LINK=$LINK
77
EOF
72
  ln -sf $GROUPMAPFILE $NODEMAPFILE
78 73

  
79
else
74
elif [ "$ACTION" == "remove" ]; then
75
  if [ ! -e "$NODEMAPFILE" ]; then
76
    exit 0;
77
  fi
80 78

  
81
  source $MAPFILE
79
  source $NODEMAPFILE
82 80

  
83 81
  if [ "$MODE" == "routed" ]; then 
84 82
    VLAN=$LINK
85 83
    TABLE=rt_$NETWORK
86
    if [ $TYPE == "public" ]; then
84
    if [ "$TYPE" == "public" ]; then
87 85
      ARP_IP=$(ipcalc $SUBNET | grep HostMax | awk '{print $2}')
88 86
    
89 87
      arptables -D OUTPUT -o $VLAN --opcode request -j mangle --mangle-ip-s  $ARP_IP 
......
94 92
      ip route del $SUBNET dev $VLAN table main 
95 93

  
96 94
      ip rule del iif $VLAN table $TABLE
97
      sed -i 's/.*'"$TABLE"'$//' /etc/iproute2/rt_tables
95
      
96
      sed -i 's/.*'"$TABLE"'$//' $RT_TABLES
98 97
    fi
99 98
  fi
100 99

  
......
102 101

  
103 102
  if [ "$MODE" == "bridged" ]; then
104 103
    BRIDGE=$LINK
105
    if [ ! -z $GATEWAY ]; then
106
      if [ $TYPE == "private" ]; then 
107
        if [ $(hostname) == $ROUTER ]; then
104
    if [ ! -z "$GATEWAY" ]; then
105
      if [ "$TYPE" == "private" ]; then 
106
        if [ "$HOSTNAME" == "$ROUTER" ]; then
108 107
          NETMASK=$(ipcalc $SUBNET | grep Netmask | awk '{print $4}')
109 108
          ip addr del $GATEWAY/$NETMASK dev $BRIDGE
110 109
          iptables -t nat -D POSTROUTING -s $SUBNET \! -d 192.168.0.0/16 -j MASQUERADE
......
113 112
    fi
114 113
  fi
115 114
  
116
  rm $MAPFILE
115
  rm $NODEMAPFILE
117 116

  
118 117
fi
b/hooks/group-modify-pre.d/snf-network
1
#!/bin/bash
2

  
3
source /etc/default/snf-network
4

  
5
source $CONF
6

  
7
GROUP=$GANETI_GROUP_NAME
8
ACTION=$GANETI_GROUP_NETWORK_ACTION
9
NETWORK=$GANETI_GROUP_NETWORK_NAME
10
MODE=$GANETI_GROUP_NETWORK_MODE
11
LINK=$GANETI_GROUP_NETWORK_LINK
12

  
13
GROUPMAPFILE=$SHAREDDIR/mappings/$NETWORK-$GROUP
14

  
15

  
16
if [ -z "$ACTION" ]; then
17
  exit 0
18
fi
19

  
20
if [ "$ACTION" == "add" ]; then
21
  cat > $GROUPMAPFILE <<EOF
22
MODE=$MODE
23
LINK=$LINK
24
EOF
25
fi
b/hooks/network-add-post.d/snf-network
1 1
#!/bin/bash
2 2

  
3
source /etc/default/snf-network
3
DEFAULT=/etc/default/snf-network
4

  
5
source $DEFAULT
6

  
7
source $CONF
8

  
9
NETWORK=$GANETI_NETWORK_NAME
4 10

  
5 11

  
6 12
NETFILE=$SHAREDDIR/networks/$NETWORK
......
19 25
TYPE=$GANETI_NETWORK_TYPE
20 26
EOF
21 27

  
22

  
28
sed -i 's/None//' $NETFILE
b/hooks/network-remove-post.d/snf-network
1 1
#!/bin/bash
2 2

  
3
source /etc/default/snf-network
3
DEFAULT=/etc/default/snf-network
4 4

  
5
source $DEFAULT 
5 6

  
6
NETFILE=$SHAREDDIR/networks/$NETWORK
7
source $CONF
8

  
9
NETWORK=$GANETI_NETWORK_NAME
7 10

  
8
rm $NETFILE
11
NETFILE=$SHAREDDIR/networks/$NETWORK
9 12

  
13
if [ -e "$NETFILE" ]; then
14
  rm $NETFILE
15
fi
b/kvm-vif-bridge
7 7
MAC2EUI64=/usr/bin/mac2eui64
8 8
NFDHCPD_STATE_DIR=/var/lib/nfdhcpd
9 9

  
10

  
11

  
10 12
function clear_tap {
11
 
13

  
12 14
 arptables -D OUTPUT -o $INTERFACE --opcode request -j mangle >/dev/null 2>&1
13 15
 while ip rule del dev $INTERFACE; do :; done
14 16
 iptables -D FORWARD -i $INTERFACE -p udp --dport 67 -j DROP 2>/dev/null
......
17 19
}
18 20

  
19 21
function routed_setup_ipv4 {
20
	# get the link's default gateway
21
	gw=$GATEWAY
22 22

  
23 23
	# mangle ARPs to come from the gw's IP
24
	arptables -A OUTPUT -o $INTERFACE --opcode request -j mangle --mangle-ip-s "$gw"
24
	arptables -A OUTPUT -o $INTERFACE --opcode request -j mangle --mangle-ip-s    "$GATEWAY"
25 25

  
26 26
	# route interface to the proper routing table
27 27
	ip rule add dev $INTERFACE table $TABLE
......
83 83
function setup_nfdhcpd {
84 84
	umask 022
85 85
  FILE=$NFDHCPD_STATE_DIR/$INTERFACE
86
  #IFACE is the interface from which the packet seems to arrive
87
  #needed in bridged mode where the packets seems to arrive from the
88
  #bridge and not from the tap
86 89
	cat >$FILE <<EOF
87 90
IFACE=$1
88 91
IP=$IP
89 92
MAC=$MAC
90
LINK=$TABLE
91 93
HOSTNAME=$INSTANCE
92 94
TAGS="$TAGS"
93 95
EOF
94
if [ -n $GATEWAY ]; then
96
if [ -n "$GATEWAY" ]; then
95 97
 echo GATEWAY=$GATEWAY >> $FILE
96 98
fi
97
if [ -n $SUBNET ]; then
99
if [ -n "$SUBNET" ]; then
98 100
 echo SUBNET=$SUBNET >> $FILE
99 101
fi
100
if [ -n $GATEWAY6 ]; then
102
if [ -n "$GATEWAY6" ]; then
101 103
 echo GATEWAY6=$GATEWAY6 >> $FILE
102 104
fi
103
if [ -n $SUBNET6 ]; then
105
if [ -n "$SUBNET6" ]; then
104 106
 echo SUBNET6=$SUBNET6 >> $FILE
105 107
fi
106 108

  
......
110 112
  TAP=$INTERFACE
111 113
  FROM=FROM${TAP^^}
112 114
  TO=TO${TAP^^}
113
  
115

  
114 116
  exist=$(ebtables -L | grep $TAP)
115
  
117

  
116 118
  if [ ! -z "$exist" ]; then
117 119
    ebtables -D INPUT -i $TAP -j $FROM
118 120
    ebtables -D FORWARD -i $TAP -j $FROM
......
132 134
  ebtables -N $FROM
133 135
  # do not allow changes in ip-mac pair
134 136
  ebtables -A $FROM --ip-source \! $IP -p ipv4 -j DROP
135
  ebtables -A $FROM -s \! $MAC -j DROP 
136
  ebtables -A FORWARD -i $TAP -j $FROM 
137
  ebtables -A $FROM -s \! $MAC -j DROP
138
  ebtables -A FORWARD -i $TAP -j $FROM
137 139
  ebtables -N $TO
138 140
  ebtables -A FORWARD -o $TAP -j $TO
139 141
  #accept dhcp responses from host (nfdhcpd)
140 142
  ebtables -A $TO -p ipv4 --ip-protocol=udp  --ip-destination-port=68 -j ACCEPT
141
  if [ $TYPE == "private" ]; then 
142
    if [ ! -z $GATEWAY ]; then 
143
  if [ "$TYPE" == "private" ]; then
144
    if [ ! -z "$GATEWAY" ]; then
143 145
      # allow packets from/to router (for masquerading
144
      ebtables -A $TO -s $ROUTER_MAC -j ACCEPT 
145
      ebtables -A INPUT -i $TAP -j $FROM 
146
      ebtables -A $TO -s $ROUTER_MAC -j ACCEPT
147
      ebtables -A INPUT -i $TAP -j $FROM
146 148
      ebtables -A OUTPUT -o $TAP -j $TO
147 149
    fi
148
    # allow only packets from the same mac prefix 
149
    ebtables -A $TO -s \! $MAC/$MAC_MASK -j DROP 
150
    # allow only packets from the same mac prefix
151
    ebtables -A $TO -s \! $MAC/$MAC_MASK -j DROP
150 152
  fi
151 153
}
152 154

  
153 155

  
154
TABLE=rt_$NETWORK
155 156

  
156
source /var/lib/snf-network/networks/$NETWORK
157
DEFAULT=/etc/default/snf-network
158
source $DEFAULT
159
source $CONF
157 160

  
161
NODEINFRAFILE=$SHAREDDIR/infra/$(hostname)
162

  
163
if [ -e "$NODEINFRAFILE" ]; then
164
  source $NODEINFRAFILE
165
fi
166

  
167

  
168
NETFILE=$SHAREDDIR/networks/$NETWORK
169
if [ -e "$NETFILE" ]; then
170
  source $NETFILE
171
fi
158 172

  
159 173
if [ "$MODE" = "routed" ]; then
174
  TABLE=rt_$NETWORK
160 175
	# special proxy-ARP/NDP routing mode
161 176
  clear_tap
162 177
	# use a constant predefined MAC address for the tap
......
179 194
	brctl addif $BRIDGE $INTERFACE
180 195
	setup_nfdhcpd $BRIDGE
181 196
  setup_ebtables
182
fi   
197
fi
b/nfdhcpd/nfdhcpd
142 142
            ips = ip.split()
143 143
        elif line.startswith("MAC="):
144 144
            mac = line.strip().split("=")[1]
145
        elif line.startswith("LINK="):
146
            link = line.strip().split("=")[1]
147 145
        elif line.startswith("HOSTNAME="):
148 146
            hostname = line.strip().split("=")[1]
149 147
        elif line.startswith("IFACE="):
......
155 153
        elif line.startswith("SUBNET6="):
156 154
            subnet6 = line.strip().split("=")[1]
157 155
        elif line.startswith("GATEWAY6="):
158
            gatewa6 = line.strip().split("=")[1]
156
            gateway6 = line.strip().split("=")[1]
159 157

  
160 158
    return Client(ifname=ifname, mac=mac, ips=ips, link=link,
161
                  hostname=hostname,iface=iface, subnet=subnet,
159
                  hostname=hostname, iface=iface, subnet=subnet,
162 160
                  gateway=gateway, subnet6=subnet6, gateway6=gateway6 )
163 161

  
164 162
class ClientFileHandler(pyinotify.ProcessEvent):
......
674 672
        logging.debug("Sending out periodic RAs")
675 673
        start = time.time()
676 674
        i = 0
677
        for client in self.clients.values():
678
            iface = client.iface
679
            ifmac = self.get_iface_hw_addr(iface)
680
            if not ifmac:
681
                continue
682

  
683
            binding = self.clients[ifmac]
675
        for binding in self.clients.values():
676
            iface = binding.ifname
677
            ifmac = binding.mac
684 678
            subnet = binding.net6
685 679
            if subnet.net is None:
686 680
                logging.debug("Skipping periodic RA on interface %s,"
b/nfdhcpd/nfdhcpd.conf
11 11
enable_dhcp = yes
12 12
lease_lifetime = 604800 # 1 week
13 13
lease_renewal = 3600 	# 1 hour
14
server_ip = 192.0.2.1
14
server_ip = 1.2.3.4
15 15
dhcp_queue = 42 # NFQUEUE number to listen on for DHCP requests
16 16
# IPv4 nameservers to include in DHCP responses
17 17
nameservers = 194.177.210.210, 194.177.210.10
b/snf-network-build-infra
1
#!/bin/bash
2

  
3
function get_value {
4
  
5
  eval def=\$$1
6
  read -p "$1? [$def] " x
7
  if [ -n "$x" ]; then eval $1="$x"; fi
8

  
9
}
10

  
11

  
12
DEFAULT=/etc/default/snf-network
13

  
14
source $DEFAULT
15
source $CONF
16
source $INFRA
17
source $CLUSTER
18

  
19
if [ ! -e "$SHAREDDIR/infra/" ]; then 
20
  exit 1
21
fi
22

  
23
cd  $SHAREDDIR/infra/
24

  
25

  
26

  
27
for nodegroup in $NODEGROUPS; do
28
  source $INFRA
29
  echo Group: $nodegroup
30
  get_value ROUTER
31
  get_value ROUTER_MAC
32
  get_value MAC_MASK
33
  get_value PUBLIC_INTERFACE
34
  get_value PUBLIC_BRIDGE
35
  get_value PUBLIC_VLAN
36
  get_value PRIVATE_VLAN
37
  get_value PRIVATE_BRIDGE
38
  get_value MASQ_VLAN
39
  get_value MASQ_BRIDGE
40
  cat > $nodegroup <<EOF
41
ROUTER=$ROUTER
42
ROUTER_MAC=$ROUTER_MAC
43
MAC_MASK=$MAC_MASK
44
PUBLIC_INTERFACE=$PUBLIC_INTERFACE
45
PUBLIC_BRIDGE=$PUBLIC_BRIDGE
46
PUBLIC_VLAN=$PUBLIC_VLAN
47
PRIVATE_VLAN=$PRIVATE_VLAN
48
PRIVATE_BRIDGE=$PRIVATE_BRIDGE
49
MASQ_VLAN=$MASQ_VLAN
50
MASQ_BRIDGE=$MASQ_BRIDGE
51
EOF
52
done
53

  
54

  
55
for node in $NODES; do
56
  echo Node: $node
57
  NODEGROUP=default
58
  get_value NODEGROUP
59
  ln -sf $NODEGROUP $node  
60
done
b/snf-network-enable
1 1
#!/bin/bash
2 2

  
3
function get_value {
4
  
5
  eval def=\$$1
6
  read -p "$1? [$def] " x
7
  if [ -n "$x" ]; then eval $1="$x"; fi
8

  
9
}
10

  
11

  
12 3
DEFAULT=/etc/default/snf-network
13 4

  
14
CONF=/etc/snf-network/snf-network.conf
15

  
16
source $CONF
17 5
source $DEFAULT
6
source $CONF
18 7

  
19 8

  
20
if [ ! -e $SHAREDDIR ]; then
9
if [ ! -e "$SHAREDDIR" ]; then
21 10
  mkdir $SHAREDDIR
22 11
  mkdir $SHAREDDIR/networks
23 12
  mkdir $SHAREDDIR/infra
......
25 14
  mkdir $SHAREDDIR/mappings
26 15
fi
27 16

  
28
#if [ -z "$(grep nfdhcpd.ferm /etc/ferm/ferm.conf)" ]; then 
29
#  echo @include 'nfdhcpd.ferm'; >> /etc/ferm/ferm.conf
30
#  /etc/init.d/ferm restart
31
#fi
32

  
33

  
34
cd  $SHAREDDIR/infra/
35

  
36
for nodegroup in $NODEGROUPS; do
37
  source $DEFAULT
38
  echo Group: $nodegroup
39
  get_value ROUTER
40
  get_value ROUTER_MAC
41
  get_value MAC_MASK
42
  get_value PUBLIC_INTERFACE
43
  get_value PUBLIC_BRIDGE
44
  get_value PUBLIC_VLAN
45
  get_value PRIVATE_VLAN
46
  get_value PRIVATE_BRIDGE
47
  get_value MASQ_VLAN
48
  get_value MASQ_BRIDGE
49
  cat > $nodegroup <<EOF
50
ROUTER=$ROUTER
51
ROUTER_MAC=$ROUTER_MAC
52
MAC_MASK=$MAC_MASK
53
PUBLIC_INTERFACE=$PUBLIC_INTERFACE
54
PUBLIC_BRIDGE=$PUBLIC_BRIDGE
55
PUBLIC_VLAN=$PUBLIC_VLAN
56
PRIVATE_VLAN=$PRIVATE_VLAN
57
PRIVATE_BRIDGE=$PRIVATE_BRIDGE
58
MASQ_VLAN=$MASQ_VLAN
59
MASQ_BRIDGE=$MASQ_BRIDGE
60
EOF
61
done
62

  
17
if [ -z "$(grep nfdhcpd.ferm /etc/ferm/ferm.conf)" ]; then 
18
  echo @include 'nfdhcpd.ferm'; >> /etc/ferm/ferm.conf
19
  /etc/init.d/ferm restart
20
fi
63 21

  
64
for node in $NODES; do
65
  echo Node: $node
66
  NODEGROUP=default
67
  get_value NODEGROUP
68
  ln -s $NODEGROUP $node  
69
done
/dev/null
1
NODEGROUPS="default"
2

  
3
NODES="dev88 dev89"
b/unconfigure-interfaces
1 1
#!/bin/bash
2 2

  
3
source /etc/default/snf-network
3
DEFAULT=/etc/default/snf-network
4

  
5
source $DEFAULT
6
source $CONF
7
source $INFRA
4 8

  
5 9
HOSTNAME=$(hostname)
6 10

  
7 11

  
8 12
INTERFACES=$SHAREDDIR/interfaces/$HOSTNAME
9
INFRA=$SHAREDDIR/infra/$HOSTNAME
10

  
11
if [ -e $INFRA ]; then
12
  source $INFRA
13
fi
13
HOSTINFRA=$SHAREDDIR/infra/$HOSTNAME
14 14

  
15 15
ifdown -i $INTERFACES -a --force
16 16

  

Also available in: Unified diff