[RFC] Bootscript changes

Dan Nicholson dbn.lists at gmail.com
Wed Apr 11 15:54:38 PDT 2007


Attached is a series of patches that hopefully resolves all the issues
below. The functions seem to work fine in my testing. I'll describe
them a bit below.

Patch 1 is just a simple fixup to suppress output from kill and
matches other locations in the functions where stderr from kill -0 is
redirected to /dev/null.

On 4/10/07, Alexander E. Patrakov <patrakov at ums.usu.ru> wrote:
> Dan Nicholson wrote:
> >
> > 1. Make statusproc() return unsuccessfully if the process isn't running
>
> +1

Patch 4. The return value from pidofproc is used.

> > 2. Make statusproc() use pidofproc() instead of the deprecated getpids()
>
> +1
>
> > 3. Allow the -p pidfile argument to all *proc() functions
>
> +1

These are spread across patches 2, 3 and 5. They affect killproc,
reloadproc and statusproc. reloadproc and statusproc were using
getpids, so I copied the input processing for -p and/or $PIDFILE from
killproc.

> > 4. Add the /sbin/service script to allow an agnostic way to query the
> > bootscripts
>
> +0

Punting this for now since no one has shown any great interest.

> 5. Apply the patch from
> http://linuxfromscratch.org/pipermail/lfs-dev/2006-October/058454.html -
> also needed for hibernation on the LiveCD when the non-standard
> implementation of the PPPoE network service is used.

As described elsewhere in this thread, the logic was just broken a bit
in killproc. This fix is rolled into patch 2 so that the handling of
pidfiles and different signals is handled appropriately.

Let me know what you think.

--
Dan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Redirect-stderr-when-using-kill-to-suppress-output.patch
Type: text/x-diff
Size: 766 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-dev/attachments/20070411/c0069be9/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Make-killproc-work-properly-with-signals-and-pidfile.patch
Type: text/x-diff
Size: 2831 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-dev/attachments/20070411/c0069be9/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Use-pidofproc-and-respect-pidfiles-in-statusproc.patch
Type: text/x-diff
Size: 1906 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-dev/attachments/20070411/c0069be9/attachment-0002.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Return-the-status-of-pidofproc-in-statusproc.patch
Type: text/x-diff
Size: 1040 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-dev/attachments/20070411/c0069be9/attachment-0003.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-Use-pidofproc-and-respect-pidfiles-in-reloadproc.patch
Type: text/x-diff
Size: 1856 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-dev/attachments/20070411/c0069be9/attachment-0004.patch>


More information about the lfs-dev mailing list