NetBSD/usr.bin/sys_info/sys_info.1

114 lines
3.3 KiB
Groff

.\" $NetBSD: sys_info.1,v 1.8 2017/09/21 07:07:28 wiz 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 September 20, 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 d Ar destination-dir
.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 d
This option provides a destination directory, used
as the root directory of an alternative set of programs
and libraries.
This can be useful for finding versions of utilities
and libraries rooted in the file system directory,
such as the destination directory from a
.Dv build.sh
run.
.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 8
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
.Nm .
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.
.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 uname 1 ,
.Xr sysctl 8
.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 .