bin/165477: [rc] dhclient is run twice

Chris Rees utisoft at gmail.com
Sun Nov 18 16:41:59 UTC 2012


On 18 Nov 2012 15:17, "Hiroki Sato" <hrs at freebsd.org> wrote:
>
> Chris Rees <crees at freebsd.org> wrote
>   in <201211181450.qAIEo0L7037418 at freefall.freebsd.org>:
>
> cr> The following reply was made to PR bin/165477; it has been noted by
GNATS.
> cr>
> cr> From: Chris Rees <crees at FreeBSD.org>
> cr> To: Hiroki Sato <hrs at freebsd.org>
> cr> Cc: wblock at freebsd.org, "freebsd-rc at freebsd.org" <
freebsd-rc at freebsd.org>,
> cr>     "bug-followup at freebsd.org" <bug-followup at freebsd.org>
> cr> Subject: Re: bin/165477: [rc] dhclient is run twice
> cr> Date: Sun, 18 Nov 2012 14:40:00 +0000
> cr>
> cr>  On 17 November 2012 22:59, Hiroki Sato <hrs at freebsd.org> wrote:
> cr>  >
> cr>  >  I think it is safe to remove the warning message when
rc_quiet=YES.
> cr>  >  What do you think about the attached patch?
> cr>
> cr>  I had originally considered that, but it then makes dhclient behave
> cr>  differently from other scripts; nothing else respects rc_quiet in
this
> cr>  fashion;
> cr>
> cr>  from rc.subr:
> cr>                  start)
> cr>                          if [ -z "$rc_fast" -a -n "$rc_pid" ]; then
> cr>                                  echo 1>&2 "${name} already running?
> cr>  (pid=$rc_pid)."
> cr>                                  return 1
> cr>                          fi
> cr>  and
> cr>
> cr>  [crees at pegasus]~/workspace/ports/musicpd% sudo service musicpd
quietstart
> cr>  musicpd already running? (pid=83847).
>
>  I cannot understand why the dhclient script behaves differently from
>  the others after patching rc.subr.  Did you read the attached patch
>  in my previous email?

I read the patch, but not the filename-- I'm sorry that Sunday afternoons
are clearly not a good time for me to review code :(

If you want to respect rc_quiet in rc.subr for the already running case,
then I think that's fine.

Chris


More information about the freebsd-rc mailing list