| Commit | Line | Data |
|---|---|---|
| 65b3153c MD |
1 | .\" Copyright (c) 2003 Matthew Dillon <dillon@backplane.com> |
| 2 | .\" All rights reserved. | |
| 3 | .\" | |
| 4 | .\" Redistribution and use in source and binary forms, with or without | |
| 5 | .\" modification, are permitted provided that the following conditions | |
| 6 | .\" are met: | |
| 7 | .\" 1. Redistributions of source code must retain the above copyright | |
| 8 | .\" notice, this list of conditions and the following disclaimer. | |
| 9 | .\" 2. Redistributions in binary form must reproduce the above copyright | |
| 10 | .\" notice, this list of conditions and the following disclaimer in the | |
| 11 | .\" documentation and/or other materials provided with the distribution. | |
| 12 | .\" | |
| 13 | .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND | |
| 14 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
| 15 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
| 16 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | |
| 17 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 18 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
| 19 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 20 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 21 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
| 22 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
| 23 | .\" SUCH DAMAGE. | |
| 24 | .\" | |
| 436e75e7 | 25 | .\" $DragonFly: src/bin/varsym/varsym.1,v 1.10 2008/02/22 05:19:25 swildner Exp $ |
| 65b3153c | 26 | .\" |
| 1072b009 | 27 | .Dd September 27, 2009 |
| 65b3153c MD |
28 | .Dt VARSYM 1 |
| 29 | .Os | |
| 30 | .Sh NAME | |
| 31 | .Nm varsym | |
| 32 | .Nd get and set user and system-wide variables for variant symlinks | |
| 33 | .Sh SYNOPSIS | |
| 34 | .Nm | |
| 2f5c5b87 | 35 | .Op Fl adpqsux |
| 1072b009 TN |
36 | .Oo |
| 37 | .Ar var Ns Op Ns Cm = Ns Ar data | |
| 38 | .Ar ... | |
| 39 | .Oc | |
| 2f5c5b87 MD |
40 | .Nm |
| 41 | .Fl x | |
| 42 | .Oo | |
| 43 | .Ar var Ns Op Ns Cm = Ns Ar data | |
| 44 | .Ar ... | |
| 45 | .Oc | |
| 46 | .Ar command | |
| 47 | .Ar args | |
| 65b3153c MD |
48 | .Sh DESCRIPTION |
| 49 | The | |
| 50 | .Nm | |
| 1072b009 TN |
51 | program manages user and system-wide variables. |
| 52 | These variables are typically | |
| 65b3153c MD |
53 | used by the system to resolve variant symlinks but may also be used generally. |
| 54 | .Pp | |
| 55 | For each operand set, modify, retrieve, or delete the specified variable. | |
| 56 | By default variables specified without data are retrieved and variables | |
| 1072b009 TN |
57 | specified with data are set. |
| 58 | Variables may be set to empty. | |
| 65b3153c | 59 | .Bl -tag -width Ar |
| 0a004aa2 | 60 | .It Fl a |
| 1072b009 TN |
61 | List all variables at the specified level. |
| 62 | Note that per-process variables | |
| 0a004aa2 | 63 | override per-user variables and per-user variables override system-wide |
| 1072b009 TN |
64 | variables. |
| 65 | By default, per-user variables are listed. | |
| 65b3153c | 66 | .It Fl d |
| 1072b009 TN |
67 | Delete mode. |
| 68 | The specified variables are deleted. | |
| 69 | Any specified data is ignored. | |
| 65b3153c MD |
70 | .It Fl p |
| 71 | This option causes variables to be set on a per-process basis and restricts | |
| 1072b009 TN |
72 | retrievals to process-specific variables. |
| 73 | Note that since | |
| 65b3153c | 74 | .Nm |
| 1bf4b486 | 75 | is run as its own process, using this option to set a variable will not |
| 65afae27 | 76 | affect your shell's namespace. |
| 2f5c5b87 MD |
77 | Instead you might want to use the |
| 78 | .Fl x | |
| 79 | option to set local varsyms and exec a command. | |
| 1072b009 TN |
80 | .It Fl q |
| 81 | Quiet mode. | |
| 82 | When retrieving a variable only its data is printed. | |
| 83 | .It Fl s | |
| 84 | This option causes variables to be set system-wide and restricts retrievals | |
| 85 | to system-specific variables. | |
| 86 | .It Fl u | |
| 87 | This option causes variables to be set on a per-user-id basis and restricts | |
| 88 | retrievals to user-specific variables. | |
| 2f5c5b87 MD |
89 | This is the default unless |
| 90 | .Fl x | |
| 91 | is used. | |
| 92 | .It Fl x | |
| 93 | This option causes variables to be set only within the | |
| 94 | .Nm | |
| 95 | process and its children, and also allows you to specify a command and | |
| 96 | arguments to exec after the var=data specifications. | |
| 65b3153c | 97 | .El |
| f0edc952 | 98 | .Sh DIAGNOSTICS |
| 65b3153c MD |
99 | The |
| 100 | .Nm | |
| 101 | utility exits with one of the following values: | |
| 102 | .Bl -tag -width Ds | |
| 103 | .It 0 | |
| 3f625015 | 104 | No errors occurred. |
| 65b3153c MD |
105 | .It 1 |
| 106 | A requested variable could not be found | |
| 107 | .It 2 | |
| 108 | A requested variable could not be set | |
| 109 | .El | |
| 110 | .Sh SEE ALSO | |
| fe67c94a | 111 | .Xr ln 1 , |
| 436e75e7 | 112 | .Xr varsym 2 , |
| fe67c94a | 113 | .Xr varsym.conf 5 |