On Tue, Nov 20, 2012 at 21:17:21 +0000, Laszlo Boszormenyi (GCS) wrote: > On Mon, 2012-11-19 at 11:07 +0100, Julien Cristau wrote: > > On Mon, Nov 19, 2012 at 01:18:34 +0000, Laszlo Boszormenyi (GCS) wrote: > > > Agree. That's an other thing upstream should fix. However I don't think > > > that would happen soon, at least not for Wheezy. I'll ask about it. > > > Until then this sleep may fixes the majority (maybe all) of the > > > problems. > > > > > Why can't this be fixed in your init script if upstream won't fix it in > > time? > Touché! First I thought it's not possible. 'couchdb -d' sends a signal > to the running process that it should stop. It returns immediately and > doesn't wait until it completely ends. Then found 'couchdb -s' which > display the status of the daemon. While it's not my initscript, I've > changed that to wait until the status is running. > Changes between the current Wheezy version and the planned 1.2.0-3 > upload is attached.
Thanks, I think that should be acceptable. > In short, it fixes four RC bugs: > - now properly create a couchdb owned rundir, That looks better, I think. > - wait for complete stop of the daemon, and this allows to: > - purge the package properly, > - restart the service without failing, Doesn't seem crazy. > - logrotate will properly own the rotated files. > OK, I guess. Though why is the dir owned by couchdb in the first place instead of root? > +--- couchdb-1.2.0.orig/etc/init/couchdb.tpl.in > ++++ couchdb-1.2.0/etc/init/couchdb.tpl.in > +@@ -102,6 +102,8 @@ stop_couchdb () { > + # Stop the running Apache CouchDB process. > + > + run_command "$COUCHDB -d" > /dev/null > ++ while [ $(couchdb -s 2>/dev/null | grep -c process) -eq 1 ]; \ > ++ do echo -n .; sleep 1; done; > + } > + > + display_status () { Slightly weird to use $COUCHDB everywhere except in this one place where you write couchdb. Cheers, Julien
signature.asc
Description: Digital signature