On Mon, 2007-07-09 at 16:26 +0200, Jim Meyering wrote: > Alan Conway <[EMAIL PROTECTED]> wrote: > > On Fri, 2007-07-06 at 23:19 +0200, Jim Meyering wrote: > >> Here's a proposed change: > >> > >> Update for Fedora/LSB init-scripts guidelines: > >> <http://fedoraproject.org/wiki/FCNewInit/Initscripts> > >> * etc/qpidd: Provide an LSB header. > >> Allow options to be specified via QPIDD_OPTIONS=... > >> in /etc/sysconfig/qpidd. > >> Diagnose and 'exit 3' for the unsupported "reload". > >> Don't mention unused $pidfile. > >> Remove useless curly braces: ${lockfile} -> $lockfile. > >> Write usage and error diagnostics to stderr, not stdout. > >> Change spelling: condrestart -> try-restart. > >> > >> I'm not sure about the Default-Start/Stop run levels. > >> If something different would be better, let me know. > >> > >> This little excursion leads me to propose a small > >> improvement for qpidd: give qpidd a --pidfile=F (-p) option, > >> whereby it would write its PID into the file F. This is better > >> than relying on the default pidof-related machinery, for when the > >> driver program is a script (e.g., a valgrind-running wrapper). > Do you need a --pidfile option to get the init scripts in goo shape, or is it a nice-to-have that can be deferred?
> >> > >> Hmm... Since we're invoking qpid via the "daemon" function, > >> I wonder if using qpid's --daemon option is unnecessary. > >> At least it sure looks that way. For now I'm leaving it. > >> Comments? > > I've gone ahead and checked that in, as-is. > > > My original intent was to replace use of daemon in init scripts with the > > --daemon flag. > > > > --daemon has some advantages over the daemon script: > > - The foreground process waits until the daemon is ready to start > > processing requests before returning. > > - The foreground process reports the actual port bound to by the daemon > > if you specify --port 0. > > Sounds like it could be useful. > I see that --port 0 works fine by itself. > But when I run "qpidd --port 0 --daemon", > there is no output. I'm using qpidc-0.2-5.fc7. > Maybe you didn't mean "by the daemon"? It works on the trunk, not sure when 0.2-5 was packaged. Check with Nuno about getting the fc7 package updated > > > - Allows you to stop a daemon by port number rather than by pid. > > Thanks for the explanation. Thanks for sorting out the init scripts! Let me know if there's anything still in your way.
