History log of /netbsd-src/etc/rc (Results 1 – 25 of 175)
Revision Date Author Comments
# 6cb68e44 08-Sep-2020 martin <martin@NetBSD.org>

Ooops, overlooked one MOUNTCRITLOCAL reference in the rename to
CRITLOCALMOUNTED.


# 31fc9817 22-Jul-2020 martin <martin@NetBSD.org>

Split the local disk availability step into two phases to allow scripts
that pre-populate parts of the system (e.g. a tmpfs based /var) an
easy place to plug in like:

# REQUIRE: mountcritlocal
# BEF

Split the local disk availability step into two phases to allow scripts
that pre-populate parts of the system (e.g. a tmpfs based /var) an
easy place to plug in like:

# REQUIRE: mountcritlocal
# BEFORE: MOUNTCRITLOCAL

This also cleans up the existing special handling a bit by separating it
into new scripts. All later scripts now depend on MOUNTCRITLOCAL.
Discussed on tech-userlevel some time ago.

show more ...


# 476172bc 20-Mar-2017 christos <christos@NetBSD.org>

set cloexec to the rc postprocessor fd (rudolf in tech-userlevel)


# 7e6c5426 02-Feb-2017 christos <christos@NetBSD.org>

add +


# 8fb3f050 02-Feb-2017 christos <christos@NetBSD.org>

set 7 and 8 to close on exec.


# 8a948b43 29-Jul-2014 apb <apb@NetBSD.org>

In the background subshell that flushes partial output every few
seconds, detach from the controlling terminal. Without this, pressing
control-T (to send SIGINFO from the terminal) would almost alwa

In the background subshell that flushes partial output every few
seconds, detach from the controlling terminal. Without this, pressing
control-T (to send SIGINFO from the terminal) would almost always result
in the sleep process printing "about N seconds left of the original 3",
which is useless information.

show more ...


# 7bc38475 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 ...


# 288496e5 09-Apr-2014 apb <apb@NetBSD.org>

Send a "nop" metadata message to the postprocessor every few seconds,
to flush partial output lines. This should help with PR 48714.


# 11bfaf8d 09-Apr-2014 apb <apb@NetBSD.org>

Add comments about the intended use of each type of metadata message.


# 75350585 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 ...


# 520fd1e5 04-Jun-2010 christos <christos@NetBSD.org>

print human readable exit code.


# 89fd5357 11-Sep-2009 apb <apb@NetBSD.org>

Add a postprocessor to /etc/rc, which logs messages to /var/run/rc.log,
and which can suppress output in silent mode. Silent mode is enabled
via the new rc_silent variable, which defaults to a value

Add a postprocessor to /etc/rc, which logs messages to /var/run/rc.log,
and which can suppress output in silent mode. Silent mode is enabled
via the new rc_silent variable, which defaults to a value that depends
on the kern.boothowto sysctl.

Part of the /etc/rc silent changes requested in PR 41946
and proposed in tech-userlevel.

show more ...


# 760b4799 10-Apr-2009 joerg <joerg@NetBSD.org>

Add rc_directories to specify where to look for rc scripts.
For the moment all scripts must be in /root and non-existent directories
are skipped.


# 15388316 04-Jan-2003 lukem <lukem@NetBSD.org>

Change how internal boolean variables are used to:
if ! ${_somevar:-false}; then
_somevar=true
fi
(Consisent, slightly quicker, and slightly cleaner)


# 96e2ff62 19-May-2002 lukem <lukem@NetBSD.org>

Add two new rc.conf(5) variables:
rc_rcorder_flags extra flags to rcorder(8) in /etc/rc
rcshutdown_rcorder_flags extra flags to rcorder(8) in /etc/rc.shutdown

This can be used to specify ex

Add two new rc.conf(5) variables:
rc_rcorder_flags extra flags to rcorder(8) in /etc/rc
rcshutdown_rcorder_flags extra flags to rcorder(8) in /etc/rc.shutdown

This can be used to specify extra directories to search for rc.d scripts in.
For example, adding the following to rc.conf(5):
rc_rcorder_flags="/usr/pkg/etc/rc.d/*"
rcshutdown_rcorder_flags="/usr/pkg/etc/rc.d/*"
will add the files in /usr/pkg/etc/rc.d to the list of files that rcorder(8)
uses to build the list of scripts to start or stop.

I proposed this functionality on tech-userlevel@ over one month ago.
Closes the recent [misc/16888], which asked for a similar feature.

show more ...


# 892c0453 18-Apr-2002 lukem <lukem@NetBSD.org>

consistently set rc_(fast|force)=yes


# 1a286b14 22-Mar-2002 lukem <lukem@NetBSD.org>

- Rename a bunch of "internal" run_rc_command() variables and officially
make them "externally" available:
Previous Current Purpose
-------- ------- -------
_arg rc_arg Argument to command,

- Rename a bunch of "internal" run_rc_command() variables and officially
make them "externally" available:
Previous Current Purpose
-------- ------- -------
_arg rc_arg Argument to command, after fast/force
processing performed (and prefix
removed)

_flags rc_flags Flags to start the default command
with. Defaults to ${name}_flags,
unless overridden by $flags from the
environment. This variable may be
changed by the precmd method.

_pid rc_pid PID of command (if appropriate).

_rc_run_fast rc_fast Not empty is "fast" was provided.

_rc_run_force rc_force Not empty is "force" was provided.

- Use rc_flags instead of _flags or ${name}_flags in various rc.d scripts,
so that $flags from the environment overrides ${name}_flags from rc.conf(5).
Fixes [bin/15800].

show more ...


# bd7fad6c 14-Jun-2001 lukem <lukem@NetBSD.org>

use symbolic signal names instead of numbers


# 28d6dbb5 09-May-2001 lukem <lukem@NetBSD.org>

explicitly set the umask to 022 to be safe


# b6742129 12-Mar-2001 lukem <lukem@NetBSD.org>

move date before rcorder


# c47a8060 28-Feb-2001 lukem <lukem@NetBSD.org>

various speed-ups (and related work):
- only load rc.conf if $_rc_conf_loaded is not set
- use case instead of if for various string comparisons
- print the date at the start of the boot as well as a

various speed-ups (and related work):
- only load rc.conf if $_rc_conf_loaded is not set
- use case instead of if for various string comparisons
- print the date at the start of the boot as well as at the end
- if $rc_fast_and_loose is set, always run the rc.d scripts in the
current shell rather than in a subshell. this is not on by default
because it's potentially dangerous (a rogue command could terminate
the boot), but it is provided as an optional speedup for people
with slow machines that have an expensive fork

show more ...


# 6eef11f2 15-Dec-2000 lukem <lukem@NetBSD.org>

- describe what rc.shutdown does, and what invokes it
- remove `.sh' suffix on script name in description


# 49533ad0 21-Aug-2000 lukem <lukem@NetBSD.org>

don't start rc.d scripts with a `nostart' keyword


# caa2beb1 22-Apr-2000 lukem <lukem@NetBSD.org>

revert previous; the fast-start functionality already existed, and
works at multi-user boot. (starting /etc/rc after single user boot
doesn't exhibit this fast start behaviour).


# 5e6480fe 19-Apr-2000 simonb <simonb@NetBSD.org>

Add an "rc_fastboot" variable check in rc.subr, that if set adds
"fast" to the start of the run_rc_command arg.

/etc/rc calls each rc.d script with rc_fastboot=yes so that rc.subr
aware scripts to u

Add an "rc_fastboot" variable check in rc.subr, that if set adds
"fast" to the start of the run_rc_command arg.

/etc/rc calls each rc.d script with rc_fastboot=yes so that rc.subr
aware scripts to use "faststart" to skip the process running check.

show more ...


1234567