I wrote a really quick and dirty upstart script to test this out on Ubuntu 
12.04, it works very well but you need to use auto vs allow-ovs in the network 
file.I will work on getting this into the git repo after I test a bit and break 
out the functions but this script will get you going and help you avoid the 
failsafe boot delay.
Upstart wants to know the pid of the daemons so running ovs-ctl will be a 
challenge without getting deep into the code.
Just put the following  in /etc/init/openvswitch.conf and disable LSB init 
scripts this can be done non-destructively by running.
$ sudo update-rc openvswitch-controller disable ; update-rc openvswitch-switch 
disable
If email batters it too much here is a link 
https://github.com/gdahlm/openvswitch/blob/ubuntu/debian/openvswitch.upstart 
Thanks,
Greg================================================================================#
 ovs-controller - Open vSwitch controller## The Open vSwitch controller enables 
OpenFlow switches that connect to it# to act as MAC-learning Ethernet switches.
description "Open vSwitch upstart script"version "0.1"author "Greg Dahlman 
<gdahl...@hotmail.com>"
emits ovs-controller-upemits ovs-vswitch-upemits net-device-added
start on (local-filesystems and started dbus)stop on stopping dbus
env DAEMON=/usr/bin/ovs-controller # Introduce the server's location hereenv 
LOGFILE=/var/log/openvswitch/ovs-controller.log  # Server logfileenv 
PIDFILE=/var/run/openvswitch/ovs-controller.pidenv LISTEN=pssl:env 
PRIVKEY=/etc/openvswitch-controller/privkey.pemenv 
CERT=/etc/openvswitch-controller/cert.pemenv 
CACERT=/etc/openvswitch-controller/cacert.pemenv DAEMON_OPTS=""env 
SSL_OPTS='--private-key='${PRIVKEY}' --certificate='${CERT}' 
--ca-cert='${CACERT}
expect fork#respawnpre-start script        [ -x ${DAEMON} ]             mkdir 
-p /var/run/openvswitch           chmod 0755 /var/run/openvswitchend script
post-start script        [ -x /usr/sbin/ovs-vswitchd ] && [ -x 
/usr/sbin/ovsdb-server ]
        /usr/share/openvswitch/scripts/ovs-ctl load-kmod        
/usr/share/openvswitch/scripts/ovs-ctl start --system-id=random        
/usr/share/openvswitch/scripts/ovs-ctl --protocol=gre enable-protocolend script
        exec ovs-controller --detach --pidfile=${PIDFILE} --log-file=${LOGFILE} 
${LISTEN} ${DAEMON_OPTS} --private-key=${PRIVKEY} --certificate=${CERT} 
--ca-cert=${CACERT}
pre-stop script/usr/share/openvswitch/scripts/ovs-ctl stopend script            
                          
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to