freebsd-skq/share
kevans 87678f95ad rc.subr: Provide rc_service variable for service scripts
Some rc scripts in ports (e.g. uwsgi, apache, openvpn) allow for
'application profiles' that usually require the rc script to be invoked
again for each active profile. Because there's no consistent way to
determine the path because it differs between manual/service(8) invocations
and /etc/rc invocations, this leads to patterns like these:

- www/uwsgi hardcodes the script path
- security/openvpn guesses either $_file or $0 based on $0 = /etc/rc

Instead of forcing rc scripts to guess, provide an rc_service variable to
the scripts that gets set appropriately both for direct execution or when a
script is being executed via run_rc_script (e.g. /etc/rc).

This is our analog of an OpenRC variable with the same name, different case
(RC_SERVICE).

PR:		234614
Reported by:	koobs
Reviewed by:	dteske, jilles
MFC after:	3 days
2019-01-05 21:23:25 +00:00
..
colldef Add ga_IE.UTF-8 locale. 2018-11-26 19:39:49 +00:00
ctypedef Add ga_IE.UTF-8 locale. 2018-11-26 19:39:49 +00:00
dict Sync with NetBSD's /usr/share/dict/words, with the exception of quim 2017-12-16 20:25:50 +00:00
doc Update several more URLs 2017-10-29 08:17:03 +00:00
dtrace Introduce dwatch(1) as a tool for making DTrace more useful 2018-03-06 23:44:19 +00:00
examples Remove iBCS2, part1: userspace 2018-12-19 21:56:54 +00:00
i18n share: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:26:40 +00:00
keys
man rc.subr: Provide rc_service variable for service scripts 2019-01-05 21:23:25 +00:00
misc DragonFly 5.4.0, 5.4.1 and FreeBSD 12.0 releases added. 2018-12-24 16:36:39 +00:00
mk For arm and armv6, only enable LLVM target support for arm by default, 2018-12-11 06:45:53 +00:00
monetdef Add ga_IE.UTF-8 locale. 2018-11-26 19:39:49 +00:00
msgdef Add ga_IE.UTF-8 locale. 2018-11-26 19:39:49 +00:00
numericdef Add ga_IE.UTF-8 locale. 2018-11-26 19:39:49 +00:00
security
sendmail share: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:26:40 +00:00
skel Add current working directory to the default (although commented out) sh(1) 2018-12-31 10:17:42 +00:00
snmp
syscons Don't use CCACHE for linking. 2018-06-27 19:29:15 +00:00
tabset
termcap termcap: add italics and tmux entries 2018-12-06 13:46:18 +00:00
tests
timedef Fix various issues with Chinese locales: 2018-12-30 23:04:02 +00:00
vt Add uk.macbook.kbd keymap (vt) 2018-12-11 02:14:40 +00:00
zoneinfo We don't actually need env here, so drop it. All shells allow setting 2018-02-09 15:50:32 +00:00
Makefile MFhead@r321912 2017-08-02 08:38:36 +00:00
Makefile.inc