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 | |
parent | d23b37874fa7e72ec53e7bccb22bb153733d389c (diff) | |
download | slackbuilds-939ae1a9e6024bfbe62acaaab52be1a4342dc9d8.tar.gz |
network/openvswitch: Update scripts.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | network/openvswitch/openvswitch.SlackBuild | 4 | ||||
-rw-r--r-- | network/openvswitch/rc.openvswitch | 21 |
2 files changed, 7 insertions, 18 deletions
diff --git a/network/openvswitch/openvswitch.SlackBuild b/network/openvswitch/openvswitch.SlackBuild index 61f8d33bf8..18229adba0 100644 --- a/network/openvswitch/openvswitch.SlackBuild +++ b/network/openvswitch/openvswitch.SlackBuild @@ -24,7 +24,7 @@ PRGNAM=openvswitch VERSION=${VERSION:-2.3.1} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} KERNEL=${KERNEL:-$(uname -r)} @@ -103,7 +103,7 @@ if [ ! -f /lib/modules/$(uname -r)/kernel/net/openvswitch/openvswitch.ko ]; then $PKG/lib/modules/${KERNEL}/kernel/extra/openvswitch fi -mkdir -p $PKG/etc/openvswitch $PKG/etc/rc.d $PKG/var/run/openvswitch +mkdir -p $PKG/var/lib/openvswitch $PKG/etc/rc.d $PKG/var/run/openvswitch sed -e "s,@DOCDIR@,/usr/doc/$PRGNAM-$VERSION,g" $CWD/rc.openvswitch \ > $PKG/etc/rc.d/rc.openvswitch.new chmod 0755 $PKG/etc/rc.d/rc.openvswitch.new 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 } |