diff options
author | Kyle Evans <kevans@FreeBSD.org> | 2020-02-05 04:29:55 +0000 |
---|---|---|
committer | Kyle Evans <kevans@FreeBSD.org> | 2020-02-05 04:29:55 +0000 |
commit | 85c8521e67a73f2076a280e7ae3bf4f44adcef76 (patch) | |
tree | 6080e82e5f71de10d1270399805c7585c4c41d2f /usr.bin/env/env.1 | |
parent | 21c1a93c048fdd9c276899e72dcb8dc93cc18e09 (diff) | |
download | src-85c8521e67a73f2076a280e7ae3bf4f44adcef76.tar.gz src-85c8521e67a73f2076a280e7ae3bf4f44adcef76.zip |
env(1): grow -L user/class and -U user/class options
This allows one to set the environment of the specified user either from
login.conf alone (-L) or both login.conf and ~/.login_conf if present (-U).
This is a supporting feature to allow service(8) to pull in the environment
of the "daemon" class before invoking the rc script.
This is a part of D21481.
Submitted by: Andrew Gierth < andrew_tao173.riddles.org.uk>
Notes
Notes:
svn path=/head/; revision=357563
Diffstat (limited to 'usr.bin/env/env.1')
-rw-r--r-- | usr.bin/env/env.1 | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/usr.bin/env/env.1 b/usr.bin/env/env.1 index bb3e4e719526..4584fde75756 100644 --- a/usr.bin/env/env.1 +++ b/usr.bin/env/env.1 @@ -31,7 +31,7 @@ .\" From FreeBSD: src/usr.bin/printenv/printenv.1,v 1.17 2002/11/26 17:33:35 ru Exp .\" $FreeBSD$ .\" -.Dd November 7, 2019 +.Dd January 19, 2020 .Dt ENV 1 .Os .Sh NAME @@ -40,6 +40,7 @@ .Sh SYNOPSIS .Nm .Op Fl 0iv +.Op Fl L Ns | Ns Fl U Ar user Ns Op / Ns Ar class .Op Fl P Ar altpath .Op Fl S Ar string .Op Fl u Ar name @@ -76,6 +77,28 @@ The environment inherited by .Nm is ignored completely. +.\" -L | -U +.It Fl L | Fl U Ar user Ns Op / Ns Ar class +Add the environment variable definitions from +.Xr login.conf 5 +for the specified user and login class to the environment, after +processing any +.Fl i +or +.Fl u +options, but before processing any +.Ar name Ns = Ns Ar value +options. +If +.Fl L +is used, only the system-wide +.Pa /etc/login.conf.db +file is read; if +.Fl U +is used, then the specified user's +.Pa ~/.login_conf +is read as well. +The user may be specified by name or by uid. .\" -P .It Fl P Ar altpath Search the set of directories as specified by @@ -450,6 +473,7 @@ option as a synonym for .Xr printenv 1 , .Xr sh 1 , .Xr execvp 3 , +.Xr login.conf 5 , .Xr environ 7 .Sh STANDARDS The @@ -457,7 +481,7 @@ The utility conforms to .St -p1003.1-2001 . The -.Fl P , S , u +.Fl 0 , L , P , S , U , u and .Fl v options are non-standard extensions supported by @@ -474,6 +498,12 @@ and .Fl v options were added in .Fx 6.0 . +The +.Fl 0 , L +and +.Fl U +options were added in +.Fx 13.0 . .Sh BUGS The .Nm |