On Thu, Jul 26, 2012 at 04:47:53PM -0700, Ansis Atteka wrote:
> On Thu, Jul 26, 2012 at 2:48 PM, Ben Pfaff <b...@nicira.com> wrote:
> 
> > Debian bug #681880.
> > CC: 681...@bugs.debian.org
> > Reported-by: Bastian Blank <wa...@debian.org>
> > Signed-off-by: Ben Pfaff <b...@nicira.com>

...

> > --- a/debian/openvswitch-switch.dirs
> > +++ b/debian/openvswitch-switch.dirs
> > @@ -1,2 +1,3 @@
> >  /etc/openvswitch
> > +/var/lib/openvswitch
> >
> A nitpick - maybe keep alphabetic sequence?

Sure, I moved the new line to the end.

> > +       # Ensure that /etc/openvswitch/conf.db links to
> > /var/lib/openvswitch,
> > +       # moving an existing file if there is one.
> > +       #
> > +       # Ditto for .conf.db.~lock~.
> > +       for base in conf.db .conf.db.~lock~; do
> > +           new=/var/lib/openvswitch/$base
> > +           old=/etc/openvswitch/$base
> > +           if test -f $old && test ! -e $new; then
> > +               mv $old $new
> > +           fi
> > +           if test ! -e $old && test ! -h $old; then
> > +               ln -s $new $old
> > +           fi
> > +       done
> >
> The code above will break fresh install, because here we would create
> a dangling symlink /etc/openvswitch/conf.db -> /var/lib/openvswitch/conf.db.
> 
> But later, when we call upgrade_db() from ovs-ctl, then the ovsdb-tool
> would try to create
> the database in /etc/openvswitch/conf.db, not in
> /var/lib/openvswitch/conf.db. And that will
> fail.

No, it succeeds, following the symlink and creating
/var/lib/openvswitch/conf.db.  (I tested it.)


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

Reply via email to