The strangeness called `sbin'

Garance A Drosehn gad at FreeBSD.org
Mon Nov 14 02:22:25 UTC 2011


On 11/12/11 5:39 AM, Ed Schouten wrote:
> Hi Doug,
>
> * Doug Barton<dougb at FreeBSD.org>, 20111112 01:40:
>    
>>> But the point is: there are quite some tools in */sbin that should be
>>> moved to */bin. I can at least point out 15 of them.
>>>        
>> Why don't we discuss those specifics first?
>>      
> In my opinion at least the following binaries are candidates of apps
> that can be moved from sbin to bin, as they all work to some degree
> without root privileges:
>
> - ac
> - arp
> - config
> - daemon
> - dmesg
> - ifconfig
> - jls
> - kldstat
> - lastlogin
> - md5
> - mtree
> - ping
> - ping6
> - pkg_info
> - pkg_version
> - pstat
> - rcorder
> - rmd160
> - sendmail
> - sha1
> - sha256
> - sysctl
>
>    
FWIW:

I wouldn't mind if md5, sha1, sha256 and rmd160 were moved, although
I can also guess why they were initially put in the '/sbin' directory.
As an aside, note the 'openssl' command is in /usr/bin, and it
includes support for those digest types as well as several others.

I wouldn't mind if ping, ping6, pkg_info, and pkg_version moved.  I
definitely don't understand why 'lastlogin' is in /usr/sbin while
'last' is in /usr/bin.

I don't think that ac, arp, config, daemon, dmesg, jls, kldstat,
rcorder, or sendmail should be moved.  I'm not sure what I think
about moving the other binaries in that list.

Even moving the binaries which are reasonable to move can cause
some problems, as sometimes scripts are written with hardcoded
paths and assumptions of what options an executable supports based
on where it was found.  This is what happens for users (or autoconf
rules) who have work with multiple flavors of unix.

In my full-time job, I do support for a college.  And given some of
the professors I have to support, there really *IS* an advantage to
having "systems-y" binary outside of their normal path.  The people
who do *need* those systems-y binaries should be people who understand
unix enough that adding /sbin to their PATH is not a problem.  And
the people I know who cannot handle setting PATH, are also people
who should not be running some of the commands listed above.

IMO.  I'm just giving my opinion, as I do not have the energy for
some long debate about every binary someone might want to move.

-- 
Garance Alistair Drosehn            =   gad at gilead.netel.rpi.edu
Senior Systems Programmer           or  gad at freebsd.org
Rensselaer Polytechnic Institute    or  drosih at rpi.edu



More information about the freebsd-arch mailing list