implicitly using $name if $rcvar isn't set), and always perform this check,
even when using start_cmd (et al).
this check is performed before the pidcmd
is run, speeding up scripts that weren't going to be run anyway.
this should speed up booting slow systems.
- take advantage of the above and remove
start_precmd="checkyesno foo"
in scripts that use start_cmd.
- explicitly set rcvar=foo in the rc.d/foo scripts which have an equivalent
rc.conf entry
- fix `rcvar' and `restart' when $rcvar isn't set.
these above changes fix PR [bin/11027].
- when doing `force*', ignore the return value of *_precmd.
this fixes PR [bin/10781].
- rename what sysdb provides from `databases' to `sysdb', to reflect
the name of the script.
- improve the comments in rc.subr
allow changing the user credentials to ${name}_user, ${name}_group,
and ${name}_groups as part of this. if ${name}_chroot is used, the following
variables won't work: ${name}_chdir and ${name}_nice.
[requested by mrg; whipped up in a few minutes on his terminal :-]
(/etc/rc.conf.d/X), then it is sourced in addition of /etc/rc.conf
This means that the base system will still use rc.conf, but that
3rd party scripts can use rc.conf.d
Currently this just loads /etc/rc.conf, but this will make it easier
for us and users to modify the config mechanism without modifying all
of /etc/rc.d/*.
- ${name}_chdir directory to cd to before running ${command}
- ${name}_nice nice level to run ${command} at
- ${name}_user user to run ${command} as
based on [misc/9954] by Dave Sainty <dave@dtsp.co.nz>, except that it works :)
from a variable ($extra_commands) as opposed to from $2-* on the
argument list. it's cleaner; and allows for the possibility of
multiple command arguments being passed to run_rc_command() in the
future.
"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.
check_pidfile parse a pidfile for a pid, checking that the
process is running, and print the matching pid
check_process print a list of running pids that match the procname
run_rc_command kitchen sink function to simplify creation of
rc.d scripts
run_rc_script invoke an rc.d script appropriately
rc_usage print a usage string for an rc.d script
err similar to err(3)
warn similar to warn(3)
* add copyright
* remove islocalfs(); nothing uses it
"/usr" must be mounted. mount_critical_filesystems() didn't mount it,
even if listed in "critical_filesystems", if it is nfs.
Solution: introduce another rc.conf variable
"critical_filesystems_beforenet" which contains filesystems to be mounted
before "netstart".
Perhaps "netstart" should be split up, but this would make things even
more complex...
rc.subr to the default rc.conf.
While this is no longer necessary to supress noise,
it increases the clarity of the situation and removes
one more bit of what should be adjustable configuration
from scripts that site admins shouldn't have to edit.
Addresses PRs misc/7406 and (partially) bin/7491.
of "local" it will not mount filesystem types it identifies as
network file systems (currently just nfs). Call the function twice,
before networking starts with arg "local", after networking starts
with arg "network". Remove critfs_require_network as is now redundant.
switch and a set of flags. Get rid of DEFAULT flags entirely. Print
warnings if on/off switches are not set, or are set incorrectly.
Add a shell function to simplify this on/off switch testing.