Subject: bin/7898: rc scripts invocation of gated fails because of path lossage.
To: None <gnats-bugs@gnats.netbsd.org>
From: None <cgd@netbsd.org>
List: netbsd-bugs
Date: 07/03/1999 02:23:16
>Number:         7898
>Category:       bin
>Synopsis:       rc scripts invocation of gated fails because of path lossage.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jul  3 02:05:01 1999
>Last-Modified:
>Originator:     Chris Demetriou
>Organization:
>Release:        NetBSD 1.4
>Environment:
stock 1.4 on various systems.
>Description:
gated will typically be in /usr/pkg/sbin or /usr/local/<something>,
and those directories are not in the path by default when
processing the rc scripts.

This means that if you enable gated, it may in fact fail to start
because it can't be found in the default path.


>How-To-Repeat:
with "normal" /etc contents, minimally changed from what
sysinst installs (e.g. set rc.conf to yes, enabled a few things,
and turn on gated), on a system with gated installed, note that
gated won't start automatically (because it's not in the 
default path used when trying to execute it).

I consider this a bug in the system because I installed gated via
the package system in the default place, and I configured /etc/rc.conf
in the "obvious" way, yet it failed anyway.
>Fix:
Several possible solutions:

* document near the gated flag that /usr/pkg/sbin (or whatever the
  gated directory is may have to be specially added to the path).

* in /etc/rc, invoke gated as /usr/bin/sbin/gated rather than just
  'gated'.

* rip gated support entirely out of /etc/rc and /etc/rc.conf, and
  make people put it in rc.local.

Personally, I favor the latter.  It's locally installed software,
not a part of the system.  We don't and can't know where it's been
installed by the user.  Therefore, we shouldn't be trying to start it
unless they stuffed it into rc.local.  It's no different than, e.g.,
ssh.  (A commented-out entry in /etc/rc.local, along with removal
of gated/gated_flags from rc & rc.conf would be Just Fine with me.
Leaving either the rc or rc.conf bits seems wrong to me.)
>Audit-Trail:
>Unformatted: