Bug#686518: [PATCH] debian: Don't depened on $RUNLEVEL at startup to create bridges.

2014-09-12 Thread Philipp S. Schmidt

The patch below fixes the problem for me - Thanks

On 11.09.2014, at 18:43, Gurucharan Shetty shet...@nicira.com wrote:

 Commit b2a0daa5bd (debian: Don't recreate bridges during manual restart.)
 added a check on $RUNLEVEL to only create bridges and ports when the
 system starts up. This fix does not work with systemd.
 
 This commit uses a different approach to solve the same problem.
 
 Reported-by: Philipp S. Schmidt ph...@in-panik.de
 Signed-off-by: Gurucharan Shetty gshe...@nicira.com
 ---
 debian/openvswitch-switch.init |   11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)
 
 diff --git a/debian/openvswitch-switch.init b/debian/openvswitch-switch.init
 index 481b29c..bf84477 100755
 --- a/debian/openvswitch-switch.init
 +++ b/debian/openvswitch-switch.init
 @@ -31,7 +31,6 @@
 test -e /etc/default/openvswitch-switch  . /etc/default/openvswitch-switch
 
 network_interfaces () {
 -[ -z ${RUNLEVEL} ]  return
 INTERFACES=/etc/network/interfaces
 [ -e ${INTERFACES} ] || return
 bridges=`awk '{ if ($1 == allow-ovs) { print $2; } }' ${INTERFACES}`
 @@ -67,11 +66,13 @@ start () {
 fi
 set $@ $OVS_CTL_OPTS
 $@ || exit $?
 -[ $2 = start ]  network_interfaces ifup
 +if [ $2 = start ]  [ $READ_INTERFACES != no ]; then
 +network_interfaces ifup
 +fi
 }
 
 stop () {
 -network_interfaces ifdown
 +[ $READ_INTERFACES != no ]  network_interfaces ifdown
 ovs_ctl stop
 }
 
 @@ -106,8 +107,8 @@ restart () {
 start restart
 fi
 else
 -stop
 -start
 +READ_INTERFACES=no stop
 +READ_INTERFACES=no start
 fi
 }
 
 -- 
 1.7.9.5
 
 

AVE!
  Philipp S. Schmidt / phils…
-- 
   {phils}--(ph...@in-panik.de)--(http://phils.in-panik.de),
  wenn w eine   aube ist dn  man au dran dre en   |
   o Schran muss hc h   (Kurt Schwitters) |
:wq!  ---(phone: +49-179-6737439)--(jabber: ph...@jabber.ccc.de)---'


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#686518: [PATCH] debian: Don't depened on $RUNLEVEL at startup to create bridges.

2014-09-12 Thread Gurucharan Shetty
On Fri, Sep 12, 2014 at 1:22 AM, Philipp S. Schmidt ph...@in-panik.de wrote:

 The patch below fixes the problem for me - Thanks

I applied the patch to master branch and 2.3 branch of OVS repo found here:
https://github.com/openvswitch/ovs

I suppose Ben will eventually upload it to debian.


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org