- chmod +x $utility
- done
-
- mkdir -p etc/sysconfig/network-scripts
- configure_netdev () {
- mkdir -p sys/class/net/${1}
- echo ${2} > sys/class/net/${1}/address
- echo ${3} > sys/class/net/${1}/tx_queue_len
-
- : >> etc/sysconfig/network-scripts/ifcfg-${1}
- }
-
- configure_netdev lo 00:00:00:00:00:00 0
- configure_netdev eth0 00:22:19:22:4b:af 1000
- configure_netdev eth1 00:22:19:22:4b:b1 1000
- configure_netdev eth2 00:15:17:a0:29:80 1000
- configure_netdev eth3 00:15:17:a0:29:81 1000
- configure_netdev eth4 00:1b:21:29:ce:51 1000
-
- mkdir -p var/xapi
- cat > var/xapi/network.dbcache <<'EOF'
+ chmod +x usr/bin/ovs-ofctl
+
+ mkdir -p etc/sysconfig/network-scripts
+ configure_netdev () {
+ mkdir -p sys/class/net/${1}
+ echo ${2} > sys/class/net/${1}/address
+ echo ${3} > sys/class/net/${1}/tx_queue_len
+ if test ${1} = eth1; then
+ # No VLAN acceleration.
+ echo 0x829 > sys/class/net/${1}/features
+ else
+ # Supports VLAN acceleration.
+ echo 0x10b89 > sys/class/net/${1}/features
+ fi
+ mkdir sys/class/net/${1}/device
+ ln -s ../../../bus/pci/drivers/e1000 sys/class/net/${1}/device/driver
+
+ : >> etc/sysconfig/network-scripts/ifcfg-${1}
+ }
+
+ configure_netdev lo 00:00:00:00:00:00 0
+ configure_netdev eth0 00:22:19:22:4b:af 1000
+ configure_netdev eth1 00:22:19:22:4b:b1 1000
+ configure_netdev eth2 00:15:17:a0:29:80 1000
+ configure_netdev eth3 00:15:17:a0:29:81 1000
+ configure_netdev eth4 00:1b:21:29:ce:51 1000
+
+ mkdir -p var/xapi
+ cat > var/xapi/network.dbcache <<'EOF'