[486] in NetBSD-Development
Re: The default PATH for NetBSD
daemon@ATHENA.MIT.EDU (Greg Hudson)
Fri Jan 27 12:38:57 1995
To: John Hawkinson <jhawk@MIT.EDU>
Cc: ghudson@MIT.EDU, netbsd-dev@MIT.EDU
In-Reply-To: Your message of "Fri, 27 Jan 1995 10:00:34 EST."
<199501271500.KAA06754@lola-granola.MIT.EDU>
Date: Fri, 27 Jan 1995 12:38:49 EST
From: Greg Hudson <ghudson@MIT.EDU>
I wrote in an RCS log:
} Set the default path for NetBSD. Two notes: /srvd/patch definitely needs
} to be in the path, and /sbin and /usr/sbin are not there. If users wish
} to add /sbin and /usr/sbin to their paths, they can, but it doesn't belong
} there by default.
Note that I wasn't thinking too carefully about /srvd/patch here; we
don't have an /srvd, so that was silly of me. I corrected this in a
later RCS log entry which John didn't include.
> I disagree with this. I think that /sbin and /usr/sbin _do_ belong
> in user's PATHS. This is more of a pragmatic opinion rather than a
> philosophical one, but there are programs in those directories that
> users ought to be able to run without dotfile hacking, thus I think
> they should be in the PATH.
In other words, you either (a) disagree with the distinction between
/bin and /sbin, and think all of those files should be in the same
directory, or you (b) think that binaries should be separated into
different directories for no reason except to make people's paths
longer.
(b) I will dismiss out of hand. (a) I am very wary of. Simply
because you don't buy into a philosophy (in this case, that there are
binaries that shouldn't be in regular users' paths) is not a good
reason to ignore it. Such reasoning led to things like the System V
IPC: I'm sure the designers of that interface have lots of reasons to
believe that all global state shouldn't be named through the
filesystem, and that may be an open question, but the point is that
they made Unix a less coherent programming interface because they
didn't extend the model in a fashion consistent with the existing
model.
I think ping and traceroute and mount and fdisk should be in users'
paths, because they might run them. I think those binaries should be
in /bin or /usr/bin. Unfortunately, I wasn't one of the designers of
the BSD 4.4 hier, and I'm not going to protest their decisions by
completely ignoring their design.
Again, if individual users think the design is broken and want to add
/sbin and /usr/sbin to their paths (thus getting programs like
ldconfig, modload, and restore in their paths which they'll never run,
that's fine, but we shouldn't do it for them.
Note that the default NetBSD /usr/bin/login sets a path of
"/usr/bin:/bin".