init(8) sets the "daemon" login class without specifying a pw
entry (so no substitutions are done on the variables). service(8)'s
use of env -L had the effect of specifying root's pw entry, with two
effects: getpwnam and getpwuid are being called, which may not be
entirely safe depending on what nsswitch is up to and what stage of
boot we are at, and substitutions would have been done.
Fix by teaching env(8) to allow -L -/classname to set the class
environment with no pw entry at all specified, and use it in
service(8).
PR: 253959
In the 761d2bb5b9 we added nojailvnet
keyword. The nojailvnet keyword is used to skip startup scripts in
jails that are run without VNET.
The service.sh was omitted in this commit. The service.sh
even documents that this is the same code as in rc - so lets reflect
that.
Submitted by: Adam Wołk <a.wolk@fudosecurity.com>
Sponsored by: Fudo Security
As mentioned in r357562, this gives the user a single place to configure
environment variables that need to be used for various services -- the
"daemon" class -- for, e.g., configuring a system-wide HTTP proxy.
This is a part of D21481.
Submitted by: Andrew Gierth <andrew_tao173.riddles.org.uk>
The introduced -j option is highly dependant on the ordering of arguments,
and it exhibited broken behavior in some other circumstances. Fix these
issues, and simplify the feature by removing the unneessary double parsing
of options.
Reviewed by: jilles
Differential Revision: https://reviews.freebsd.org/D13952
r328032 introduced a second round of argument parsing to proxy the request
through to a jail as needed, but failed to reset OPTIND before getting to
the second round of parsing to allow other flags to be set.
Reported by: Oleg Ginzburg <olevole olevole ru>
Provide a -j option that can take a jail name or id. If -j is specified,
check that the jail exists and proxy the service request through to
service(8) in the jail.
This allows for cleaner workflows when updating services in a jail, turning
the following:
pkg -j dns upgrade
jexec dns service named restart
into:
pkg -j dns upgrade
service -j dns named restart
PR: 223325
Submitted by: David O'Rourke (with slight changes)
MFC after: 2 weeks
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.
The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
No functional change intended.
To use tmux in an rc.d script, use the new-session flag "-d".
To use screen in an rc.d script, use the "-dm" flag.
If you really need to launch an attached session, manually
export TERM=xterm (FreeBSD 9.0 or higher) or export TERM=cons25
for older releases.
Reported by: bdrewery
Discussed on: src-committers, svn-src-all, svn-src-head
PR: bin/191869
would behave differently when utilizing rc-script was invoked manually vs.
service(8). The issue being that these utilities require the TERM environ
variable to be set and service(8) was not passing it down.
Reported by: Michael Dexter <editor@callfortesting.org>
PR: bin/191869
Reviewed by: allanjude
MFC after: 3 days
X-MFC-to: stable/10, stable/9
Its primary purpose is to start and stop services provided by
the rc.d scripts, however it can also be used to list the scripts
using various criteria.