e5c13d3e3e
Add -L and -P flags to allow the library/cmd search paths to be set. Add support for getting vers info from sh, dhcpcd, and userland (/etc/release). Stop abusing "sh -x" to support -v - do it properly. Get rid of the duplicate list of components used when there are no args, instead make better use of sh capabilities to just process everything. Better use of what sh can do for us other places too. Add a (more or less random) set of libraries to include in output when no args are given. OK agc (well, earlier version...)
108 lines
3.2 KiB
Groff
108 lines
3.2 KiB
Groff
.\" $NetBSD: sys_info.1,v 1.3 2017/08/23 01:17:46 kre Exp $
|
|
.\"
|
|
.\" Copyright (c) 2016 Alistair Crooks <agc@NetBSD.org>
|
|
.\" All rights reserved.
|
|
.\"
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
.\" modification, are permitted provided that the following conditions
|
|
.\" are met:
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
.\"
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
.\"
|
|
.Dd August 23, 2017
|
|
.Dt SYS_INFO 1
|
|
.Os
|
|
.Sh NAME
|
|
.Nm sys_info
|
|
.Nd script to show system version information
|
|
.Sh SYNOPSIS
|
|
.Nm
|
|
.Op Fl v
|
|
.Op Fl L Ar lib-path
|
|
.Op Fl P Ar path
|
|
.Op Ar component No ...
|
|
.Sh DESCRIPTION
|
|
The
|
|
.Nm
|
|
script displays version numbers for system components.
|
|
It is useful for finding out the installed versions of
|
|
the components of a system.
|
|
The
|
|
.Nm
|
|
utility uses a combination of ways to retrieve version
|
|
information from the installed utilities.
|
|
.Sh OPTIONS
|
|
The following options are available:
|
|
.Bl -tag -width inits
|
|
.It Fl L
|
|
Give a list of directories
|
|
.Pq "colon separated"
|
|
that are used when searching for libraries.
|
|
If not given the value of
|
|
.Ev LD_LIBRARY_PATH
|
|
is used if set in the environment, or otherwise
|
|
a standard (built-in) set of directories.
|
|
.It Fl P
|
|
Set
|
|
.Ev PATH .
|
|
If not given, the system default path, as obtained from
|
|
.Ic user.cs_path
|
|
via
|
|
.Xr sysctl 1
|
|
is used.
|
|
To use the current value of $PATH from the caller, use:
|
|
.Dl -P \*q$PATH\*q
|
|
.It Fl v
|
|
Show the commands used to obtain the version information
|
|
for each component
|
|
.El
|
|
.Pp
|
|
Arguments may be given to sys_info.
|
|
If any arguments are specified, they are assumed
|
|
to be names of programs, or shared libraries,
|
|
installed on the system.
|
|
If no arguments are provided, then all of the
|
|
items that are known to
|
|
.Nm
|
|
are reported.
|
|
.Pp
|
|
If arguments are provided, the output is displayed in
|
|
alphabetical order, and duplicates are removed.
|
|
.Sh EXIT STATUS
|
|
.Nm
|
|
exits with status 2 if an unknown option is given,
|
|
otherwise with status 1 if an unknown component is specified,
|
|
otherwise, with status 0.
|
|
.Sh SEE ALSO
|
|
.Xr awk 1 ,
|
|
.Xr sed 1 ,
|
|
.Xr strings 1 ,
|
|
.Xr sysctl 1 ,
|
|
.Xr uname 1
|
|
.Sh HISTORY
|
|
The
|
|
.Nm
|
|
program was first seen in
|
|
.Nx 8 .
|
|
.Sh AUTHORS
|
|
The
|
|
.Nm
|
|
script was written by
|
|
.An Alistair Crooks Aq Mt agc@NetBSD.org .
|
|
.Sh BUGS
|
|
Component names containing spaces given as arguments do not work.
|