1*598b83d4Swiz.\" $NetBSD: sys_info.1,v 1.8 2017/09/21 07:07:28 wiz Exp $ 23f81b607Sagc.\" 33f81b607Sagc.\" Copyright (c) 2016 Alistair Crooks <agc@NetBSD.org> 43f81b607Sagc.\" All rights reserved. 53f81b607Sagc.\" 63f81b607Sagc.\" Redistribution and use in source and binary forms, with or without 73f81b607Sagc.\" modification, are permitted provided that the following conditions 83f81b607Sagc.\" are met: 93f81b607Sagc.\" 1. Redistributions of source code must retain the above copyright 103f81b607Sagc.\" notice, this list of conditions and the following disclaimer. 113f81b607Sagc.\" 2. Redistributions in binary form must reproduce the above copyright 123f81b607Sagc.\" notice, this list of conditions and the following disclaimer in the 133f81b607Sagc.\" documentation and/or other materials provided with the distribution. 143f81b607Sagc.\" 153f81b607Sagc.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 163f81b607Sagc.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 173f81b607Sagc.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 183f81b607Sagc.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 193f81b607Sagc.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 203f81b607Sagc.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 213f81b607Sagc.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 223f81b607Sagc.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 233f81b607Sagc.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 243f81b607Sagc.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 253f81b607Sagc.\" 26c77bafdeSagc.Dd September 20, 2017 273f81b607Sagc.Dt SYS_INFO 1 283f81b607Sagc.Os 293f81b607Sagc.Sh NAME 303f81b607Sagc.Nm sys_info 31e5c13d3eSkre.Nd script to show system version information 323f81b607Sagc.Sh SYNOPSIS 333f81b607Sagc.Nm 34*598b83d4Swiz.Op Fl v 35*598b83d4Swiz.Op Fl d Ar destination-dir 36e5c13d3eSkre.Op Fl L Ar lib-path 37e5c13d3eSkre.Op Fl P Ar path 38e5c13d3eSkre.Op Ar component No ... 393f81b607Sagc.Sh DESCRIPTION 403f81b607SagcThe 413f81b607Sagc.Nm 423f81b607Sagcscript displays version numbers for system components. 433f81b607SagcIt is useful for finding out the installed versions of 443f81b607Sagcthe components of a system. 453f81b607SagcThe 463f81b607Sagc.Nm 473f81b607Sagcutility uses a combination of ways to retrieve version 483f81b607Sagcinformation from the installed utilities. 493f81b607Sagc.Sh OPTIONS 50e5c13d3eSkreThe following options are available: 513f81b607Sagc.Bl -tag -width inits 52*598b83d4Swiz.It Fl d 53*598b83d4SwizThis option provides a destination directory, used 54*598b83d4Swizas the root directory of an alternative set of programs 55*598b83d4Swizand libraries. 56*598b83d4SwizThis can be useful for finding versions of utilities 57*598b83d4Swizand libraries rooted in the file system directory, 58*598b83d4Swizsuch as the destination directory from a 59*598b83d4Swiz.Dv build.sh 60*598b83d4Swizrun. 61e5c13d3eSkre.It Fl L 62e5c13d3eSkreGive a list of directories 63e5c13d3eSkre.Pq "colon separated" 64e5c13d3eSkrethat are used when searching for libraries. 65e5c13d3eSkreIf not given the value of 66e5c13d3eSkre.Ev LD_LIBRARY_PATH 67e5c13d3eSkreis used if set in the environment, or otherwise 68e5c13d3eSkrea standard (built-in) set of directories. 69e5c13d3eSkre.It Fl P 70e5c13d3eSkreSet 71e5c13d3eSkre.Ev PATH . 72e5c13d3eSkreIf not given, the system default path, as obtained from 73e5c13d3eSkre.Ic user.cs_path 74e5c13d3eSkrevia 75acc8606cSwiz.Xr sysctl 8 76e5c13d3eSkreis used. 77e5c13d3eSkreTo use the current value of $PATH from the caller, use: 78e5c13d3eSkre.Dl -P \*q$PATH\*q 793f81b607Sagc.It Fl v 80e5c13d3eSkreShow the commands used to obtain the version information 81e5c13d3eSkrefor each component 823f81b607Sagc.El 838df5d761Sagc.Pp 8476fb9e13SwizArguments may be given to 8576fb9e13Swiz.Nm . 868df5d761SagcIf any arguments are specified, they are assumed 878df5d761Sagcto be names of programs, or shared libraries, 888df5d761Sagcinstalled on the system. 898df5d761SagcIf no arguments are provided, then all of the 908df5d761Sagcitems that are known to 918df5d761Sagc.Nm 928df5d761Sagcare reported. 93e5c13d3eSkre.Sh EXIT STATUS 94e5c13d3eSkre.Nm 95e5c13d3eSkreexits with status 2 if an unknown option is given, 96e5c13d3eSkreotherwise with status 1 if an unknown component is specified, 97e5c13d3eSkreotherwise, with status 0. 983f81b607Sagc.Sh SEE ALSO 993f81b607Sagc.Xr awk 1 , 100e5c13d3eSkre.Xr sed 1 , 101e5c13d3eSkre.Xr strings 1 , 102acc8606cSwiz.Xr uname 1 , 103acc8606cSwiz.Xr sysctl 8 1043f81b607Sagc.Sh HISTORY 1053f81b607SagcThe 1063f81b607Sagc.Nm 1073f81b607Sagcprogram was first seen in 1083f81b607Sagc.Nx 8 . 1093f81b607Sagc.Sh AUTHORS 1103f81b607SagcThe 1113f81b607Sagc.Nm 1123f81b607Sagcscript was written by 1133f81b607Sagc.An Alistair Crooks Aq Mt agc@NetBSD.org . 114