Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 02 Dec 1998 00:34:38 -0800
From:      Mike Smith <mike@smith.net.au>
To:        Nate Williams <nate@mt.sri.com>
Cc:        Mike Smith <mike@smith.net.au>, Luoqi Chen <luoqi@watermarkgroup.com>, committers@FreeBSD.ORG
Subject:   Re: full path of sysctl in bsd.port.mk? 
Message-ID:  <199812020834.AAA05369@dingo.cdrom.com>
In-Reply-To: Your message of "Tue, 01 Dec 1998 22:24:31 MST." <199812020524.WAA03866@mt.sri.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> [ sysctl not found in the 'standard' places ]
> > > > Sysctl should be in your path; it's a general-purpose enquiry tool.
> > > > 
> > > It's in /sbin and I don't include it in my path as a non-root user. Isn't
> > > it a unix convention that system binaries (/sbin /usr/sbin) are included only
> > > in superuser's path? Most of them require root priviledge anyway. For the few
> > > that I do use frequently as a regular user (e.g. ping, traceroute), I have
> > > aliases for them in my shell's setup.
> > 
> > >From hier(7):
> > 
> >      /sbin/   system programs and administration utilities fundamental to both
> >               single-user and multi-user environments
> > 
> > sysctl is a system program fundamental to both single-user and
> > multi-user environments.  It's a popular misconception that */sbin
> > contains administrator-only programs; one that is popular amongst the
> > sort of admins that like to keep their users as much in the dark as
> > possible.
> 
> Actually, go look at the programs in /sbin, and you'll be hard pressed
> to find any 'generically' useful programs aside from ping and traceroute
> that normal users can use.

Sure, because most of them aren't required in single-user mode and thus 
are in /usr/sbin.  If you take this criteria out, ie. just look at all 
of the programs in */sbin, you'll find a pile more.  The ones in /sbin 
simply have the extra requirement that they be available in single-user 
mode.

> I'd say this 'misconception' is anything but a misconception, but a fact
> of the way life is.

Not at all.  The division between 'bin' and 'sbin' material is 
conceptually reasonably clear, and it's not drawn along admin/non-admin 
lines.

Other systems are perhaps less ethnically pure (witness eg. 'mach' on
SunOS systems), and there are some throwbacks in the name of convention
(eg. 'uname'), but the philosophy is sound.

> > As the general interacive interface to the system MIB, sysctl 
> > definitely belongs in /sbin.
> 
> Agreed, but it's not generically useful, nor should it be something
> normal users should rely on using.  The interface changes too much, and
> it's use should be 'hidden' from use by normal users so they don't
> *have* to use it to get their job done.

It is generally useful; witness the context of the discussion.  It is 
also something that should be relied on for what it does.  The 
interface hasn't changed much (please show CVS evidence otherwise if 
you want to bicker, and give context for "too much").

As for hiding it, it's certainly not something I expect people to be 
typing interactively all the time, but for what it does it's no worse 
than awk or printf.

> 
> Nate
> 

-- 
\\  Sometimes you're ahead,       \\  Mike Smith
\\  sometimes you're behind.      \\  mike@smith.net.au
\\  The race is long, and in the  \\  msmith@freebsd.org
\\  end it's only with yourself.  \\  msmith@cdrom.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199812020834.AAA05369>