Revision 5f1ac457

/dev/null
1
#! /bin/bash
2
# Script to bring a network (tap) device for qemu-kvm up
3
# The idea is to add the tap device to the same bridge
4
# as we have default routing to.
5

  
6
# in order to be able to find brctl
7
PATH=$PATH:/sbin:/usr/sbin
8

  
9
: ${BRIDGE:=auto_nodes_br}
10

  
11
ip=$(which ip)
12

  
13
brctl=$(which brctl)
14

  
15
if [ ! "$ip" -o ! "$brctl" ]; then
16
   echo "W: $0: not doing any bridge processing: ip or brctl utility not found" >&2
17
   exit 0
18
fi
19

  
20
$ip link set "$1" up
21

  
22
brctl addif $BRIDGE "$1"
23

  
24
exit 0
b/snf-deploy/scripts/ifup
1
#! /bin/bash
2
# Script to bring a network (tap) device for qemu-kvm up
3
# The idea is to add the tap device to the same bridge
4
# as we have default routing to.
5

  
6
# in order to be able to find brctl
7
PATH=$PATH:/sbin:/usr/sbin
8

  
9
: ${BRIDGE:=auto_nodes_br}
10

  
11
ip=$(which ip)
12

  
13
brctl=$(which brctl)
14

  
15
if [ ! "$ip" -o ! "$brctl" ]; then
16
   echo "W: $0: not doing any bridge processing: ip or brctl utility not found" >&2
17
   exit 0
18
fi
19

  
20
$ip link set "$1" up
21

  
22
brctl addif $BRIDGE "$1"
23

  
24
exit 0

Also available in: Unified diff