I'm going to be bold and submit a patch for this in anticipation that "--pidfile" will be found valid for RHEL and Fedora. It can be modified if anyone objects.
https://reviews.apache.org/r/7460/ On Fri, Oct 5, 2012 at 3:35 PM, Marcus Sorensen <shadow...@gmail.com> wrote: > I don't have access to RHEL, but I checked the initscripts source rpms > for Fedora 15-18Alpha, and they all have "--pidfile" as an option for > the 'daemon' function in /etc/init.d/functions. > > On Thu, Oct 4, 2012 at 10:28 PM, Rohit Yadav <rohit.ya...@citrix.com> wrote: >> >> On 05-Oct-2012, at 2:29 AM, Marcus Sorensen <shadow...@gmail.com> wrote: >> >>> Does this patch work on certain distros? On CentOS 6.3, if I replace >>> 'start_daemon' with 'daemon' I get: >>> >>> Starting CloudStack Usage Monitor cloud-usage/etc/init.d/cloud-usage: >>> Usage: daemon [+/-nicelevel] {program} >>> cat: /var/run/cloud-usage.pid: No such file or directory >>> [FAILED] >>> >>> I actually have to replace "start_daemon -p" with "daemon --pidfile" >>> for it to work. >> >> Hi Marcus, you're right. For CentOS, -p may not work on all version; >> daemon/lsb standard also suggests to use --pidfile; >> The standard refers to use start-stop-daemon with args --start or --stop, >> instead of daemon [0]. >> >> Can we check if --pidfile args will work for Fedora, RHEL too even though >> waf uses the CentOS's script while building rpms? >> Comments, Wido, Prasanna, Edison? >> >> If you've already fixed that, can you post the patch? Thanks. >> >> [0] http://www.thegeekstuff.com/2012/03/lsbinit-script/ >> >> Regards. >> >>> >>> On Tue, Sep 25, 2012 at 4:46 AM, Wido den Hollander <w...@widodh.nl> wrote: >>>> >>>> ----------------------------------------------------------- >>>> This is an automatically generated e-mail. To reply, visit: >>>> https://reviews.apache.org/r/7248/#review11892 >>>> ----------------------------------------------------------- >>>> >>>> Ship it! >>>> >>>> >>>> Ship It! >>>> >>>> - Wido den Hollander >>>> >>>> >>>> On Sept. 25, 2012, 11:45 a.m., Rohit Yadav wrote: >>>>> >>>>> ----------------------------------------------------------- >>>>> This is an automatically generated e-mail. To reply, visit: >>>>> https://reviews.apache.org/r/7248/ >>>>> ----------------------------------------------------------- >>>>> >>>>> (Updated Sept. 25, 2012, 11:45 a.m.) >>>>> >>>>> >>>>> Review request for cloudstack, Prasanna Santhanam, edison su, and Wido >>>>> den Hollander. >>>>> >>>>> >>>>> Description >>>>> ------- >>>>> >>>>> Download original patch and git am <patch>: (CentOS and RHEL) >>>>> http://bhaisaab.org/patches/cloudstack/0001-CLOUDSTACK-81-Use-non-lsb-function.patch >>>>> >>>>> For Fedora: >>>>> http://bhaisaab.org/patches/cloudstack/0001-CLOUDSTACK-81-Fix-typo-in-function-name-for-script-i.patch >>>>> >>>>> >>>>> Diffs >>>>> ----- >>>>> >>>>> usage/distro/fedora/SYSCONFDIR/rc.d/init.d/cloud-usage.in 69f1b2c >>>>> >>>>> Diff: https://reviews.apache.org/r/7248/diff/ >>>>> >>>>> >>>>> Testing >>>>> ------- >>>>> >>>>> >>>>> Thanks, >>>>> >>>>> Rohit Yadav >>>>> >>>>> >>>> >>