diff options
-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 } |