History log of /freebsd-11.0-release/share/man/man8/rc.subr.8
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 303975 11-Aug-2016 gjb

Copy stable/11@r303970 to releng/11.0 as part of the 11.0-RELEASE
cycle.

Prune svn:mergeinfo from the new branch, and rename it to RC1.

Update __FreeBSD_version.

Use the quarterly branch for the default FreeBSD.conf pkg(8) repo and
the dvd1.iso packages population.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 302408 08-Jul-2016 gjb

Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle.
Prune svn:mergeinfo from the new branch, as nothing has been merged
here.

Additional commits post-branch will follow.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 295949 24-Feb-2016 araujo

- Add a global option where we can protect processes when swap space
is exhausted.

How to use:

Basically we need to add on rc.conf an another option like:

If we want to protect only the main processes.
syslogd_oomprotect="YES"

If we want to protect all future children of the specified processes.
syslogd_oomprotect="ALL"

PR: 204741 (based on)
Submitted by: eugen@grosbein.net
Reviewed by: jhb, allanjude, rpokala and bapt
MFC after: 4 weeks
Relnotes: Yes
Sponsored by: gandi.net
Differential Revision: https://reviews.freebsd.org/D5176


# 272974 11-Oct-2014 hrs

Add ${name}_env and ${name}_prepend. ${name}_env is an argument list which
will be passed to env(1). ${name}_prepend is simply prepended to the command
line for $command.


# 255809 23-Sep-2013 des

Add a setup script for unbound(8) called local-unbound-setup. It
generates a configuration suitable for running unbound as a caching
forwarding resolver, and configures resolvconf(8) to update unbound's
list of forwarders in addition to /etc/resolv.conf. The initial list
is taken from the existing resolv.conf, which is rewritten to point to
localhost. Alternatively, a list of forwarders can be provided on the
command line.

To assist this script, add an rc.subr command called "enabled" which
does nothing except return 0 if the service is enabled and 1 if it is
not, without going through the usual checks. We should consider doing
the same for "status", which is currently pointless.

Add an rc script for unbound, called local_unbound. If there is no
configuration file, the rc script runs local-unbound-setup to generate
one.

Note that these scripts place the unbound configuration files in
/var/unbound rather than /etc/unbound. This is necessary so that
unbound can reload its configuration while chrooted. We should
probably provide symlinks in /etc.

Approved by: re (blanket)


# 230116 14-Jan-2012 dougb

Remove documentation for set_rcvar() now that it has been removed.


# 230007 12-Jan-2012 rea

rc.d: document 'quiet' prefix and fix dhclient/devd interaction

Document the current semantics of the 'quiet' command prefix
in the rc.subr(8).

Fix dhclient rc.d script: it should not call err() for
non-DHCP-enabled interface when it is called from devd, because the
latter just blindly calls 'service dhclient quietstart' on each "link
up" event.

Since the 'quietstart' will silence the message "Cannot 'start' <foo>.
Set <foo>_enable to YES in /etc/rc.conf or use 'onestart' instead of
'start'." and running dhclient on the non-DHCP-enabled interface is
the same thing as running the service <foo> without <foo>_enable set,
such modification is in sync with the current semantics of the 'quiet'
prefix.

Approved by: glebius
Reviewed by: freebsd-rc list
MFC after: 2 weeks


# 203102 28-Jan-2010 emaste

Clean up rc.subr man page after removing leftover NetBSD compat. Also
switch to 2-clause license per NetBSD rc.subr.8 r1.19.

Submitted by: Alex Kozlov


# 180628 20-Jul-2008 lme

Properly underline force_depend's parameter.

Reviewed by: brueffer


# 177796 31-Mar-2008 skv

Fix punctiation.

Approved by: ru


# 173013 26-Oct-2007 yar

o Add a note that checkyesno takes a variable by its name, not value.
o Improve mdoc(7) markup and style of the paragraph on stop_boot.


# 169668 18-May-2007 mtm

o Implement the stop_boot subroutine [1]. This subroutine can be used by
scripts in rc.d to stop rc(8) from booting into multi-user mode when
a critical or severe error condition is encountered.

o Modify scripts in etc/rc.d that already implemented this functionality
independently.

o Document it.

[1] - This subroutine was implemented in FreeBSD in rc.d/fsck. I moved it
to rc.subr(8). Our version differs slightly in that it takes an
optional argument to stop the boot even if "autoboot" is not set.

Obtained from: NetBSD
MFC after: 2 weeks


# 165566 27-Dec-2006 yar

MFp4:

Document my recent changes to rc.subr(8):
- there is $required_modules now;
- $required_* are checked before invoking a custom start method, too.

MFC after: 1 month


# 161530 22-Aug-2006 flz

Backout this commit since it breaks startup and some scripts in
certain conditions. I haven't been able to find a better solution yet:

- Set a two read-only variables (${prefix} and ${etcdir}). This is
especially useful when using /etc/rc.d scripts with third-party
software installed from ports.
- Fix rc.d/sshd to work with openssh from ports using ${etcdir}
instead of hardcoded /etc.
- Reflect prefix/etcdir changes in rc.subr.8.

src/etc/rc.d/sshd: rev 1.9 -> 1.10
src/etc/rc.subr: rev 1.51 -> 1.52
src/share/man/man8/rc.subr.8: rev 1.11 -> 1.12

Approved by: cperciva (mentor)


# 160615 24-Jul-2006 yar

Improve mark-up: References to "start" as an rc.d method
should be tagged with ".Cm". (Refs to "stop" are OK already.)

MFC after: 3 days


# 159835 21-Jun-2006 yar

Don't forget to touch Dd.


# 159828 21-Jun-2006 yar

Quite a number of rc.d scripts try to load kernel modules. Many
of them do that conditionally depending on kldstat. The code is
duplicated all over, but bugs can be uniqie.

To make the things more consistent, introduce a new rc.subr function,
load_kld, which takes care of loading a kernel module conditionally.

(Found this lying for a while in my p4 branch for various hacks.)


# 159367 07-Jun-2006 flz

Reflect latest changes in rc.subr wrt prefix/etcdir variables being set
automatically by load_rc_config.

With help from: ru (mdoc-fu)
Reviewed by: brueffer
Approved by: cperciva


# 157473 04-Apr-2006 flz

- Sync rc.subr with NetBSD.
- Merge some documentation bits.

Reviewed by: brooks, simon (doc)
Approved by: cperciva (mentor)
Obtained from: NetBSD
MFC after: 3 days


# 155913 22-Feb-2006 yar

Forgot to bump .Dd in the last commit.


# 155907 22-Feb-2006 yar

Document the relation between $command and $foo_program.

PR: docs/68453
MFC after: 3 days


# 151686 26-Oct-2005 yar

Use consistent punctuation and vertical indenting around .Dl's.
Wrap a too long line.


# 151685 26-Oct-2005 yar

Document that `reload' is not provided by default
yet it can be enabled when applicable.


# 131866 09-Jul-2004 ru

Fixed markup.


# 131530 03-Jul-2004 ru

Mechanically kill hard sentence breaks and double whitespaces.


# 126304 27-Feb-2004 mtm

NetBSD rev. 1.10
successful [is spelled] with only one l

NetBSD rev. 1.12
Implement ``one'' prefix to allow a "one shot" operation as if
${rcvar}=yes yet all the other prerequisite tests are still performed.
The existing ``force'' prefix is a sledgehammer that ignores all the
prerequisite checks and always returns a zero exit status; this is a
more gentle approach to the problem of "manipulate this disabled
service without editing rc.conf(5)".

Obtained From: NetBSD


# 113839 22-Apr-2003 dougb

FreeBSD has no systrace(1), and our rc.subr does not support it.

Submitted by: Simon L. Nielsen <simon@nitro.dk>


# 108317 27-Dec-2002 schweikh

english(4) police.


# 107143 21-Nov-2002 gordon

Update rc(8) manpage to reflect rc.d
Add an rc.subr(8) manpage
Hook rc.subr.8 up to the build.

Submitted by: Mike Makonnen <mtm@identd.net>
Approved by: re@ (bmah)
Obtained from: NetBSD