rendered paste body#! /bin/bash
#
# localnetwork Bring up/down networking using a bridge (for KVM-QEMU)
#
# chkconfig: 5 10 90
# description: Activates/Deactivates all network interfaces configured to \
# start at boot time, using a KVM-QEMU compatible interface.
#
### BEGIN INIT INFO
# Provides: $network
### END INIT INFO
# Source function library.
. /etc/init.d/functions
action "Configuring bridging: " /usr/sbin/brctl addbr br0
action "Enabling local bridge access: " /usr/sbin/brctl addif br0 eth0
action "Configuring ethernet for bridging: " /sbin/ifconfig eth0 0.0.0.0 up
action "Configuring IP address: " /sbin/ifconfig br0 172.16.97.3
action "Configuring routing: " /sbin/route add default gw 172.16.97.254