diff options
author | Christopher Walker <kris240376@gmail.com> | 2015-05-12 16:23:09 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2015-05-12 16:23:27 +0700 |
commit | 939ae1a9e6024bfbe62acaaab52be1a4342dc9d8 (patch) | |
tree | f2da92806e43c95f54b817fea18e62dedc1e1ff1 /network/openvswitch/rc.openvswitch | |
parent | d23b37874fa7e72ec53e7bccb22bb153733d389c (diff) | |
download | slackbuilds-939ae1a9e6024bfbe62acaaab52be1a4342dc9d8.tar.gz |
network/openvswitch: Update scripts.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/openvswitch/rc.openvswitch')
-rw-r--r-- | network/openvswitch/rc.openvswitch | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/network/openvswitch/rc.openvswitch b/network/openvswitch/rc.openvswitch index 0fc64c127d..9d2fd75e46 100644 --- a/network/openvswitch/rc.openvswitch +++ b/network/openvswitch/rc.openvswitch @@ -6,16 +6,7 @@ # # % chmod 755 /etc/rc.d/rc.openvswitch -# Before you can run Open vSwitch daemon, you must have a database. To -# install an initial database, perform the following as root: -# -# % modprobe openvswitch_mod -# % ovsdb-tool create /etc/openvswitch/ovs-vswitchd.conf.db @DOCDIR@/schema/vswitch.ovsschema -# - -# Module to make Open vSwitch compatible with Linux bridge utils: -BRCOMPAT=0 - +DBCONF=/var/lib/openvswitch/ovs-vswitchd.conf.db SOCKET=/var/run/openvswitch/db.sock VSPID=/var/run/openvswitch/ovs-vswitchd.pid DBPID=/var/run/openvswitch/ovsdb-server.pid @@ -26,15 +17,13 @@ DBPID=/var/run/openvswitch/ovsdb-server.pid # Insert kernel driver for VLANs: /sbin/modprobe 8021q -# Insert kernel driver for bridge util compatibility: -if [ $BRCOMPAT -ne 0 ] ; then - /sbin/modprobe brcompat -fi - # Start openvswitch: openvswitch_start() { echo "Starting openvswitch: /etc/rc.d/rc.openvswitch" - /usr/sbin/ovsdb-server /etc/openvswitch/ovs-vswitchd.conf.db --remote=punix:$SOCKET --detach --pidfile=$DBPID --verbose=ANY:ANY:err + if [ ! -f $DBCONF ]; then + ovsdb-tool create $DBCONF @DOCDIR@/schema/vswitch.ovsschema + fi + /usr/sbin/ovsdb-server $DBCONF --remote=punix:$SOCKET --detach --pidfile=$DBPID --verbose=ANY:ANY:err /usr/bin/ovs-vsctl --no-wait --verbose=ANY:ANY:err init /usr/sbin/ovs-vswitchd unix:$SOCKET --detach --pidfile=$VSPID --verbose=ANY:ANY:err } |