History log of /netbsd/etc/rc.subr (Results 1 – 25 of 111)
Revision Date Author Comments
# 2d52435a 22-May-2022 andvar <andvar@NetBSD.org>

fix various small typos, mainly in comments.


# 263c6cef 06-Feb-2022 alnsn <alnsn@NetBSD.org>

Small changes in mount_critical_filesystems_zfs

avoid unnecessary eval, switch to $() and -ne.

from kre@, thanks!


# c7f4f370 03-Feb-2022 alnsn <alnsn@NetBSD.org>

Compare $_mount_es with 0


# a84a4b61 03-Feb-2022 alnsn <alnsn@NetBSD.org>

Add mount_critical_filesystems_zfs

The new function is similar to mount_critical_filesystems
but it walks through ZFS datasets and mounts matching entries.


# a46afebc 06-Nov-2021 christos <christos@NetBSD.org>

Set the path unconditionally to what rc sets it to, so that when running
individual scripts like 'env - /etc/rc.d/syslogd restart' programs like
rcorder are found.


# be605088 20-Dec-2020 uwe <uwe@NetBSD.org>

run_rc_command - don't prefix the rcvar variable name with the dollar sign.

The output without the dollar sign is less confusing as it's actual
valid shell syntax:

$ /etc/rc.d/foo rcvar
# food

run_rc_command - don't prefix the rcvar variable name with the dollar sign.

The output without the dollar sign is less confusing as it's actual
valid shell syntax:

$ /etc/rc.d/foo rcvar
# food
food=YES

Brought up on tech-userlevel@ by Rocky Hotas with some LGTMs from
other people and no objections.

We still refer to '$food' in warnings/errors though.

show more ...


# 584db37f 17-Sep-2020 otis <otis@NetBSD.org>

Fix waiting for PIDs on stop.

Fix expansion of positional parameters. Also move the local
variable declaration to more apropriate place.


# 09fc8810 05-Apr-2020 christos <christos@NetBSD.org>

Prevent waiting for processes to exit forever by introducing _rc_kill_ntries,
which if set, will SIGKILL the processes that did not die yet.


# bee3dc11 23-Sep-2018 kre <kre@NetBSD.org>

rc.subr can be used in install images (from sysinst) so must use only
POSIX specified test uses (no -a or -o). Also, use printf always,
rather than echo (replace echo as a function using echo with

rc.subr can be used in install images (from sysinst) so must use only
POSIX specified test uses (no -a or -o). Also, use printf always,
rather than echo (replace echo as a function using echo with one which
uses printf).

show more ...


# e98b65ed 11-Apr-2018 christos <christos@NetBSD.org>

Hide ps error about processes not found (we could be more specific...)
It is superfluous, since we print:
foo not running? (check /var/run/foo/foo.pid).


# 69cc5896 01-Apr-2018 kre <kre@NetBSD.org>

PR misc/53145 (Bruce Lilly)

Use ps -A instead of ps -ax (-A means -ax, but -A is posix, -x is not)
Use ps -o args instead of ps -o command (same reason).

This makes no difference when the ps used i

PR misc/53145 (Bruce Lilly)

Use ps -A instead of ps -ax (-A means -ax, but -A is posix, -x is not)
Use ps -o args instead of ps -o command (same reason).

This makes no difference when the ps used is /bin/ps on NetBSD, but
can make a difference when some other ps command gets invoked instead.

XXX pullup -8

show more ...


# 02cba554 13-Apr-2017 christos <christos@NetBSD.org>

remove env.


# 127969e7 21-Mar-2017 christos <christos@NetBSD.org>

Clear rc variables that contain state that is gone after the boot process
is complete, so that scripts invoked from powerd don't think that they
are still invoked by the rc system and fail.
Reported

Clear rc variables that contain state that is gone after the boot process
is complete, so that scripts invoked from powerd don't think that they
are still invoked by the rc system and fail.
Reported by rudolf @ tech-userlevel

show more ...


# 83093540 06-Mar-2016 christos <christos@NetBSD.org>

Introduce kat() a built-in version of cat(1) that strips shell-like comments.


# 8387087b 31-Oct-2015 phx <phx@NetBSD.org>

PR misc/50046
Remove the expensive tests in _have_rc_postprocessor(), as proposed by apb@.
It more than halves the multiuser boot time on slow machines and brings
it back near to the previous level.


# e4a1dcd8 07-Oct-2014 roy <roy@NetBSD.org>

sleep for 0.05 seconds instead of 2 seconds when checking if the pids
are still alive for a much faster exit.


# 1391b68f 21-Sep-2014 roy <roy@NetBSD.org>

Add checkyesnox function so we can test a configurable without
being warned of its non-existance.


# f421d5e4 27-Jul-2014 apb <apb@NetBSD.org>

In rc.subr, add _have_rc_postprocessor function and use it instead of
inline tests like [ -n "${_rc_postprocessor_fd}" ]. The new function
performs a few new tests, including verifying that /etc/rc i

In rc.subr, add _have_rc_postprocessor function and use it instead of
inline tests like [ -n "${_rc_postprocessor_fd}" ]. The new function
performs a few new tests, including verifying that /etc/rc is still
running (using a new _rc_pid variable set by /etc/rc).

This is intended to deal with the case that a script run from /etc/rc
spawns a background process, then /etc/rc exits, but the background
process still has environment variables inherited from /etc/rc.

Fixes PR 46546.

show more ...


# 43f8792e 22-Jul-2014 wiz <wiz@NetBSD.org>

'file system' for consistency with documentation (instead of 'filesystem').


# c363d98e 17-Dec-2012 apb <apb@NetBSD.org>

Add shell implementations of basename and dirname to rc.subr. They
are supposed to mimic basename(1) and dirname(1), except that they
are usable before /usr/bin is mounted.


# 266834ad 07-Apr-2012 christos <christos@NetBSD.org>

back out change that makes onestart work, to be committed at some other time.


# 3b9ffcc7 07-Apr-2012 christos <christos@NetBSD.org>

give wedges to everyone


# 7efe7ebd 07-Apr-2012 apb <apb@NetBSD.org>

The error message when /var is not a file system chhanged from
mount: unknown special file or file system `/var'
to
mount: Unknown special file or file system `/var'
so match them both.


# ae9fe5be 11-Aug-2011 apb <apb@NetBSD.org>

Allow "echo -n" to work as expected in rc.d scripts that are executed
by /etc/rc. Similarly for printf with a format that does not end with
"\n". Previously, the partial line would not be visible o

Allow "echo -n" to work as expected in rc.d scripts that are executed
by /etc/rc. Similarly for printf with a format that does not end with
"\n". Previously, the partial line would not be visible on the console
until a newline was printed, possibly after an annoying delay.

This is done by adding echo() and printf() shell functions to rc.subr,
so that naive use of the echo and printf commands in rc.d scripts will
call these functions instead of the underlying commands. These shell
functions send a new "nop" metadata message after the partial line, and
the rc_postprocess function in /etc/rc disentangles the partial line of
plain output from the metadata "nop".

Also add a "-n" option to the print_rc_normal function in rc.subr,
and make some cosmetic changes.

show more ...


# 663fbc24 09-Jun-2011 christos <christos@NetBSD.org>

PR/42642: Ed Ravin: Handle daemons that start with #!/usr/bin/env interp


12345