Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F150306935
D36006.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D36006.diff
View Options
Index: libexec/rc/rc.subr
===================================================================
--- libexec/rc/rc.subr
+++ libexec/rc/rc.subr
@@ -804,6 +804,8 @@
#
# ${name}_prepend n Command added before ${command}.
#
+# ${name}_setup n Command executed before ${command}.
+#
# ${name}_login_class n Login class to use, else "daemon".
#
# ${name}_limits n limits(1) to apply to ${command}.
@@ -993,8 +995,8 @@
_group=\$${name}_group _groups=\$${name}_groups \
_fib=\$${name}_fib _env=\$${name}_env \
_prepend=\$${name}_prepend _login_class=\${${name}_login_class:-daemon} \
- _limits=\$${name}_limits _oomprotect=\$${name}_oomprotect \
- _env_file=\$${name}_env_file
+ _limits=\$${name}_limits _oomprotect=\$${name}_oomprotect \
+ _setup=\$${name}_setup _env_file=\$${name}_env_file
if [ -n "$_env_file" ] && [ -r "${_env_file}" ]; then # load env from file
set -a
@@ -1149,6 +1151,12 @@
fi
fi
+ if [ -n "$_setup" ]; then
+ if ! _run_rc_doit "$_setup"; then
+ warn "failed to setup ${name}"
+ fi
+ fi
+
# Prepend default limits
_doit="$_cd limits -C $_login_class $_limits $_doit"
@@ -2187,7 +2195,7 @@
# check_namevarlist var
# Return "0" if ${name}_var is reserved in rc.subr.
-_rc_namevarlist="program chroot chdir env flags fib nice user group groups prepend"
+_rc_namevarlist="program chroot chdir env flags fib nice user group groups prepend setup"
check_namevarlist()
{
local _v
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 1, 2:01 AM (15 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30646598
Default Alt Text
D36006.diff (1 KB)
Attached To
Mode
D36006: rc: add ${name}_setup script support
Attached
Detach File
Event Timeline
Log In to Comment