OpenBSD CVS

CVS log for src/share/man/man8/rc.d.8


[BACK] Up to [local] / src / share / man / man8

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.40 / (download) - annotate - [select for diffs], Fri Sep 2 22:11:57 2022 UTC (20 months, 4 weeks ago) by ajacoutot
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, HEAD
Changes since 1.39: +2 -7 lines
Diff to previous 1.39 (colored)

Make rc_configtest behave like rc_pre and rc_post; i.e. don't define a default
function (each rc.d script is supposed to define its own if wanted).
This way, we can filter out the "configtest" action depending on whether the
function exists or not.
Adapt documentation.

tweak/ok kn@

Revision 1.39 / (download) - annotate - [select for diffs], Thu Sep 1 07:25:32 2022 UTC (21 months ago) by ajacoutot
Branch: MAIN
Changes since 1.38: +10 -3 lines
Diff to previous 1.38 (colored)

Add a new action: "configtest", to check configuration syntax of the daemon.
A few adjustments will be done in the next days (like disabling this action if
there's no specific rc_configtest function defined).

e.g.
/etc/rc.d/sshd configtest
rcctl configtest sshd

idea from naddy@

Revision 1.38 / (download) - annotate - [select for diffs], Thu May 26 11:27:03 2022 UTC (2 years ago) by ajacoutot
Branch: MAIN
Changes since 1.37: +4 -2 lines
Diff to previous 1.37 (colored)

Introduce a new daemon_execdir variable for changing to a specified directory
before running rc_rcexec.

Based on an proposal from openbsd.tech at aisha.cc
ok robert@ abieber@

Revision 1.37 / (download) - annotate - [select for diffs], Tue Nov 9 11:43:47 2021 UTC (2 years, 6 months ago) by kn
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.36: +7 -4 lines
Diff to previous 1.36 (colored)

Clarify ksh(1) dependency

OK aja

Revision 1.36 / (download) - annotate - [select for diffs], Sat Feb 27 09:28:05 2021 UTC (3 years, 3 months ago) by ajacoutot
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.35: +7 -2 lines
Diff to previous 1.35 (colored)

Add logger(1) support for daemons that are logging to stdout/stderr (mostly from
the go ecosystem).
Properly handle failing daemon startup now that we have pipefail.

To take advantage of this new feature, just add foo_logger=facility to the
daemon rc.d(8) script or in rc.conf.local(8) or use rcctl:
rcctl set foo logger daemon.info

tweak for checking flags in rcctl(8) from martijn@
"this looks pretty good" deraadt@
ok sthen@

Revision 1.35 / (download) - annotate - [select for diffs], Tue Aug 27 20:05:02 2019 UTC (4 years, 9 months ago) by awolk
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.34: +4 -4 lines
Diff to previous 1.34 (colored)

Sync example with current databases/postgresql flags

OK sthen@, pea@

Revision 1.34 / (download) - annotate - [select for diffs], Thu Jul 27 07:49:05 2017 UTC (6 years, 10 months ago) by tb
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.33: +3 -3 lines
Diff to previous 1.33 (colored)

The -d flag prevents redirection of stdout (not stdin) and stderr
to /dev/null.

noticed by Matthew <chohag () jtan ! com>

Revision 1.33 / (download) - annotate - [select for diffs], Sat May 27 13:51:52 2017 UTC (7 years ago) by ajacoutot
Branch: MAIN
Changes since 1.32: +3 -6 lines
Diff to previous 1.32 (colored)

Add an ALRM timer to cope with 2 annoying issues in rc.d(8):
- prevent a daemon from hanging the boot
(typo in your flagsm e.g. httpd_flags=-d)
- make sure we can get the status of a backgrounded daemon instead of always
returning success

Side effect of this is that we can kill a knob! rip rc_bg :-)
Ports will need love, and a second commit is coming for that.

The diff is small yet not trivial so I am committing early in the release
process in one shot so it can easily be reverted if needed. I started working on
this during g2k16 in Cambridge then finished it in Brisbane for a2k17 where
robert@, beck@ and sthen@ agreed it was the correct way to go and I should move
ahead with it post 6.1.

If you see any regression, please talk to me!

Revision 1.32 / (download) - annotate - [select for diffs], Thu May 25 09:40:18 2017 UTC (7 years ago) by ajacoutot
Branch: MAIN
Changes since 1.31: +3 -3 lines
Diff to previous 1.31 (colored)

Four, not three variables can be overriden. But the number is not important
so just drop it.
reported by thelocals_job_applicant at protonmail

Revision 1.31 / (download) - annotate - [select for diffs], Tue Apr 26 17:43:12 2016 UTC (8 years, 1 month ago) by ajacoutot
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.30: +13 -10 lines
Diff to previous 1.30 (colored)

Document recent rc.subr/rc.d changes.

ok sthen@ robert@

Revision 1.30 / (download) - annotate - [select for diffs], Fri Oct 30 11:04:56 2015 UTC (8 years, 7 months ago) by sthen
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.29: +5 -2 lines
Diff to previous 1.29 (colored)

Point out that daemon class, via login.conf, can be used to set more than
just the process limits - show that, in particular, environment variables and
scheduling priority can be set in this way. Discussed with ajacoutot, robert,
schwarze, I went with wording suggested by schwarze@ which was much better
than mine.

Revision 1.29 / (download) - annotate - [select for diffs], Mon Sep 21 09:23:35 2015 UTC (8 years, 8 months ago) by jmc
Branch: MAIN
Changes since 1.28: +4 -3 lines
Diff to previous 1.28 (colored)

scatter some rcctl refs; from rob pierce
discussed with ajacoutot

Revision 1.28 / (download) - annotate - [select for diffs], Wed Feb 25 23:01:28 2015 UTC (9 years, 3 months ago) by rpe
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.27: +5 -5 lines
Diff to previous 1.27 (colored)

Synchronize daemon_flags and postgresql_flags examples with rcscript.

OK sthen ajacoutot

Revision 1.27 / (download) - annotate - [select for diffs], Thu Jan 15 09:20:37 2015 UTC (9 years, 4 months ago) by ajacoutot
Branch: MAIN
Changes since 1.26: +12 -3 lines
Diff to previous 1.26 (colored)

Extend the description of _timeout.

Revision 1.26 / (download) - annotate - [select for diffs], Tue Jul 22 08:48:07 2014 UTC (9 years, 10 months ago) by ajacoutot
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.25: +5 -5 lines
Diff to previous 1.25 (colored)

Drop quotes and mention that 3 and not 2 variables can be overridden.

ok robert@

Revision 1.25 / (download) - annotate - [select for diffs], Wed Jul 9 14:19:22 2014 UTC (9 years, 10 months ago) by ajacoutot
Branch: MAIN
Changes since 1.24: +9 -2 lines
Diff to previous 1.24 (colored)

Add a daemon_timeout variable for rc_wait().
It represents the maximum time in seconds to wait for the start, stop
and reload actions to return. Defaults to "30".
No default behavior is changed.

ok beck@ sthen@ jasper@ giovanni@

Revision 1.24 / (download) - annotate - [select for diffs], Sun Sep 29 13:17:43 2013 UTC (10 years, 8 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.23: +3 -4 lines
Diff to previous 1.23 (colored)

fix some formatting warnings;

Revision 1.23 / (download) - annotate - [select for diffs], Sun Sep 29 10:11:14 2013 UTC (10 years, 8 months ago) by sthen
Branch: MAIN
Changes since 1.22: +17 -8 lines
Diff to previous 1.22 (colored)

Instead of demonstrating the method to override rc.d variables with a
(relatively uncommon) change of uid, demonstrate changing flags instead,
as this is more common (and hoping that this reduces the chance of users
editing the rc.d script directly which can cause problems at upgrade time).
Feedback from jmc, tweaks from schwarze, ok jmc schwarze ajacoutot

Revision 1.22 / (download) - annotate - [select for diffs], Sat Sep 1 07:08:37 2012 UTC (11 years, 9 months ago) by ajacoutot
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.21: +9 -4 lines
Diff to previous 1.21 (colored)

Make '-f' only affects the "start" action.
There is no reason we couldn't reload|stop a daemon even when _flags is
set to NO.
As a bonus side effect, we can now see usage() on disabled scripts.

discussed with sthen@ and espie@
ok sthen@

Revision 1.21 / (download) - annotate - [select for diffs], Wed Feb 22 10:38:24 2012 UTC (12 years, 3 months ago) by ajacoutot
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.20: +8 -2 lines
Diff to previous 1.20 (colored)

Mention and explain the /var/run/rc.d/ directory.

ok sthen@

Revision 1.20 / (download) - annotate - [select for diffs], Sun Oct 9 08:54:29 2011 UTC (12 years, 7 months ago) by ajacoutot
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.19: +2 -12 lines
Diff to previous 1.19 (colored)

Remove the BUGS section, it's been taken care of.

Revision 1.19 / (download) - annotate - [select for diffs], Thu Sep 29 17:58:31 2011 UTC (12 years, 8 months ago) by jmc
Branch: MAIN
Changes since 1.18: +4 -4 lines
Diff to previous 1.18 (colored)

tweak previous;

Revision 1.18 / (download) - annotate - [select for diffs], Tue Sep 20 07:48:20 2011 UTC (12 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.17: +3 -4 lines
Diff to previous 1.17 (colored)

tweak previous

Revision 1.17 / (download) - annotate - [select for diffs], Mon Sep 19 21:20:45 2011 UTC (12 years, 8 months ago) by robert
Branch: MAIN
Changes since 1.16: +24 -11 lines
Diff to previous 1.16 (colored)

document the new rc.d script arguments and remove the reference
to the old-style RC_DEBUG environment variable

Revision 1.16 / (download) - annotate - [select for diffs], Fri Jul 8 17:43:58 2011 UTC (12 years, 10 months ago) by sthen
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.15: +10 -4 lines
Diff to previous 1.15 (colored)

Make a distinction between base/pkg rc scripts. ok aja@ schwarze@ jmc@
(with a tweak from jmc).

Revision 1.15 / (download) - annotate - [select for diffs], Fri Jul 8 02:14:13 2011 UTC (12 years, 10 months ago) by ajacoutot
Branch: MAIN
Changes since 1.14: +4 -4 lines
Diff to previous 1.14 (colored)

Rename 'rc_scripts' to 'pkg_scripts' to make it clear this variable is for
packages _only_. One is not supposed to add any base scripts in it.

naddy@ doesn't care (I think he does care but he won't admit it)
ok robert@

(I'll add something to current.html in a few)

Revision 1.14 / (download) - annotate - [select for diffs], Wed Jul 6 23:46:10 2011 UTC (12 years, 10 months ago) by ajacoutot
Branch: MAIN
Changes since 1.13: +2 -7 lines
Diff to previous 1.13 (colored)

rc.d(8) now handle some base daemons as well.

ok robert@

Revision 1.13 / (download) - annotate - [select for diffs], Fri Jun 10 08:46:56 2011 UTC (12 years, 11 months ago) by ajacoutot
Branch: MAIN
Changes since 1.12: +1 -7 lines
Diff to previous 1.12 (colored)

One less entry in BUGS.

Revision 1.12 / (download) - annotate - [select for diffs], Thu May 26 14:38:47 2011 UTC (13 years ago) by jmc
Branch: MAIN
Changes since 1.11: +2 -3 lines
Diff to previous 1.11 (colored)

no .Pp before/after .S{s,h};

Revision 1.11 / (download) - annotate - [select for diffs], Thu May 26 13:25:57 2011 UTC (13 years ago) by ajacoutot
Branch: MAIN
Changes since 1.10: +9 -2 lines
Diff to previous 1.10 (colored)

BUGS: there is currently no way to know whether a background process was
successfully started so rc_start will always succeed.

ok robert@

Revision 1.10 / (download) - annotate - [select for diffs], Thu Mar 24 11:15:40 2011 UTC (13 years, 2 months ago) by ajacoutot
Branch: MAIN
Changes since 1.9: +5 -1 lines
Diff to previous 1.9 (colored)

Document daemon_flags=NO.

ok robert@

Revision 1.9 / (download) - annotate - [select for diffs], Thu Mar 17 21:37:27 2011 UTC (13 years, 2 months ago) by jmc
Branch: MAIN
Changes since 1.8: +3 -2 lines
Diff to previous 1.8 (colored)

add missing .El;

Revision 1.8 / (download) - annotate - [select for diffs], Thu Mar 17 17:32:31 2011 UTC (13 years, 2 months ago) by ajacoutot
Branch: MAIN
Changes since 1.7: +10 -2 lines
Diff to previous 1.7 (colored)

Document RC_DEBUG.

"I love having slaves" && ok robert@

Revision 1.7 / (download) - annotate - [select for diffs], Tue Mar 15 12:21:08 2011 UTC (13 years, 2 months ago) by ajacoutot
Branch: MAIN
Changes since 1.6: +13 -2 lines
Diff to previous 1.6 (colored)

Document daemon_class, with wording help from jmc@

Revision 1.6 / (download) - annotate - [select for diffs], Sun Mar 13 02:00:28 2011 UTC (13 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.5: +17 -12 lines
Diff to previous 1.5 (colored)

Some cleanup of the discussion of rc.d variables:
A bit more precision, insert the proper section header,
and avoid remarks in parentheses.
ok ajacoutot@

Revision 1.5 / (download) - annotate - [select for diffs], Thu Mar 10 16:49:48 2011 UTC (13 years, 2 months ago) by ajacoutot
Branch: MAIN
Changes since 1.4: +3 -5 lines
Diff to previous 1.4 (colored)

Changing daemon_flags on already running processes can make any kind of
action fail, not just reload and stop.

ok sthen@

Revision 1.4 / (download) - annotate - [select for diffs], Sun Mar 6 07:03:49 2011 UTC (13 years, 2 months ago) by ajacoutot
Branch: MAIN
Changes since 1.3: +3 -3 lines
Diff to previous 1.3 (colored)

Clarify.

ok schwarze@ jmc@

Revision 1.3 / (download) - annotate - [select for diffs], Sat Mar 5 12:56:33 2011 UTC (13 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.2: +8 -10 lines
Diff to previous 1.2 (colored)

Minor polishing that was missed during the recent rc.subr(8) split:
* Avoid markup of "daemon" when not explicitly referring to the variable.
* Improve some wording, remove one typo and one useless .Pp.
Reminded by jmc@, ok jmc@ ajacoutot@

Revision 1.2 / (download) - annotate - [select for diffs], Thu Feb 24 07:06:35 2011 UTC (13 years, 3 months ago) by ajacoutot
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.1: +4 -4 lines
Diff to previous 1.1 (colored)

Fix several documentation bugs (including a typo fix from schwarze@).
Missing documentation about the naming policy for rc scripts.
Document rcexec.
Remove daemon_shell, it's proved useless at best and can introduce
issues we don't want to deal with.

prodded by, discussed with and ok espie@
ok robert@ miod@

Revision 1.1 / (download) - annotate - [select for diffs], Thu Feb 17 18:22:44 2011 UTC (13 years, 3 months ago) by espie
Branch: MAIN

split along user/implementation lines.
After lots of back and forth with jmc@ and schwarze.

okay miod@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.