CVS log for src/etc/rc.subr
Up to [cvs.NetBSD.org] / src / etc
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
Revision 1.111: download - view: text, markup, annotated - select for diffs
Sun May 22 11:27:33 2022 UTC (2 years, 8 months ago) by andvar
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630,
perseant-exfatfs-base,
perseant-exfatfs,
netbsd-10-base,
netbsd-10-1-RELEASE,
netbsd-10-0-RELEASE,
netbsd-10-0-RC6,
netbsd-10-0-RC5,
netbsd-10-0-RC4,
netbsd-10-0-RC3,
netbsd-10-0-RC2,
netbsd-10-0-RC1,
netbsd-10,
HEAD
Diff to: previous 1.110: preferred, colored
Changes since revision 1.110: +2 -2
lines
fix various small typos, mainly in comments.
Revision 1.110: download - view: text, markup, annotated - select for diffs
Sun Feb 6 16:23:12 2022 UTC (3 years ago) by alnsn
Branches: MAIN
Diff to: previous 1.109: preferred, colored
Changes since revision 1.109: +9 -10
lines
Small changes in mount_critical_filesystems_zfs
avoid unnecessary eval, switch to $() and -ne.
from kre@, thanks!
Revision 1.109: download - view: text, markup, annotated - select for diffs
Thu Feb 3 21:02:47 2022 UTC (3 years ago) by alnsn
Branches: MAIN
Diff to: previous 1.108: preferred, colored
Changes since revision 1.108: +2 -2
lines
Compare $_mount_es with 0
Revision 1.108: download - view: text, markup, annotated - select for diffs
Thu Feb 3 20:52:44 2022 UTC (3 years ago) by alnsn
Branches: MAIN
Diff to: previous 1.107: preferred, colored
Changes since revision 1.107: +74 -1
lines
Add mount_critical_filesystems_zfs
The new function is similar to mount_critical_filesystems
but it walks through ZFS datasets and mounts matching entries.
Revision 1.107: download - view: text, markup, annotated - select for diffs
Sat Nov 6 23:11:43 2021 UTC (3 years, 3 months ago) by christos
Branches: MAIN
Diff to: previous 1.106: preferred, colored
Changes since revision 1.106: +2 -1
lines
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.
Revision 1.106: download - view: text, markup, annotated - select for diffs
Sun Dec 20 21:30:28 2020 UTC (4 years, 1 month ago) by uwe
Branches: MAIN
CVS tags: cjep_sun2x-base1,
cjep_sun2x-base,
cjep_sun2x,
cjep_staticlib_x-base1,
cjep_staticlib_x-base,
cjep_staticlib_x
Diff to: previous 1.105: preferred, colored
Changes since revision 1.105: +3 -3
lines
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.
Revision 1.105: download - view: text, markup, annotated - select for diffs
Thu Sep 17 20:29:03 2020 UTC (4 years, 4 months ago) by otis
Branches: MAIN
Diff to: previous 1.104: preferred, colored
Changes since revision 1.104: +5 -4
lines
Fix waiting for PIDs on stop.
Fix expansion of positional parameters. Also move the local
variable declaration to more apropriate place.
Revision 1.102.2.2: download - view: text, markup, annotated - select for diffs
Wed Apr 8 14:03:56 2020 UTC (4 years, 10 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.102.2.1: preferred, colored; branchpoint 1.102: preferred, colored; next MAIN 1.103: preferred, colored
Changes since revision 1.102.2.1: +43 -16
lines
Merge changes from current as of 20200406
Revision 1.104: download - view: text, markup, annotated - select for diffs
Sun Apr 5 21:03:08 2020 UTC (4 years, 10 months ago) by christos
Branches: MAIN
CVS tags: phil-wifi-20200421,
phil-wifi-20200411,
phil-wifi-20200406
Diff to: previous 1.103: preferred, colored
Changes since revision 1.103: +43 -16
lines
Prevent waiting for processes to exit forever by introducing _rc_kill_ntries,
which if set, will SIGKILL the processes that did not die yet.
Revision 1.102.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 10 21:42:39 2019 UTC (5 years, 8 months ago) by christos
Branches: phil-wifi
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +25 -10
lines
Sync with HEAD
Revision 1.100.10.3: download - view: text, markup, annotated - select for diffs
Sun Sep 30 01:45:07 2018 UTC (6 years, 4 months ago) by pgoyette
Branches: pgoyette-compat
CVS tags: pgoyette-compat-merge-20190127
Diff to: previous 1.100.10.2: preferred, colored; branchpoint 1.100: preferred, colored; next MAIN 1.101: preferred, colored
Changes since revision 1.100.10.2: +25 -10
lines
Ssync with HEAD
Revision 1.103: download - view: text, markup, annotated - select for diffs
Sun Sep 23 23:02:39 2018 UTC (6 years, 4 months ago) by kre
Branches: MAIN
CVS tags: phil-wifi-20191119,
phil-wifi-20190609,
pgoyette-compat-20190127,
pgoyette-compat-20190118,
pgoyette-compat-1226,
pgoyette-compat-1126,
pgoyette-compat-1020,
pgoyette-compat-0930,
netbsd-9-base,
netbsd-9-4-RELEASE,
netbsd-9-3-RELEASE,
netbsd-9-2-RELEASE,
netbsd-9-1-RELEASE,
netbsd-9-0-RELEASE,
netbsd-9-0-RC2,
netbsd-9-0-RC1,
netbsd-9,
is-mlppp-base,
is-mlppp
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +25 -10
lines
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).
Revision 1.100.10.2: download - view: text, markup, annotated - select for diffs
Mon Apr 16 01:57:33 2018 UTC (6 years, 10 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.100.10.1: preferred, colored; branchpoint 1.100: preferred, colored
Changes since revision 1.100.10.1: +3 -3
lines
Sync with HEAD, resolve some conflicts
Revision 1.102: download - view: text, markup, annotated - select for diffs
Wed Apr 11 18:51:22 2018 UTC (6 years, 10 months ago) by christos
Branches: MAIN
CVS tags: phil-wifi-base,
pgoyette-compat-0906,
pgoyette-compat-0728,
pgoyette-compat-0625,
pgoyette-compat-0521,
pgoyette-compat-0502,
pgoyette-compat-0422,
pgoyette-compat-0415
Branch point for: phil-wifi
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +3 -3
lines
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).
Revision 1.100.10.1: download - view: text, markup, annotated - select for diffs
Sat Apr 7 04:11:58 2018 UTC (6 years, 10 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +3 -3
lines
Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
Revision 1.100.4.1: download - view: text, markup, annotated - select for diffs
Wed Apr 4 16:07:33 2018 UTC (6 years, 10 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE,
netbsd-8-2-RELEASE,
netbsd-8-1-RELEASE,
netbsd-8-1-RC1,
netbsd-8-0-RELEASE,
netbsd-8-0-RC2,
netbsd-8-0-RC1
Diff to: previous 1.100: preferred, colored; next MAIN 1.101: preferred, colored
Changes since revision 1.100: +3 -3
lines
Pull up following revision(s) (requested by kre in ticket #689):
etc/rc.subr: revision 1.101
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
Revision 1.101: download - view: text, markup, annotated - select for diffs
Sun Apr 1 18:26:51 2018 UTC (6 years, 10 months ago) by kre
Branches: MAIN
CVS tags: pgoyette-compat-0407
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +3 -3
lines
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
Revision 1.98.2.1: download - view: text, markup, annotated - select for diffs
Wed Apr 26 02:52:18 2017 UTC (7 years, 9 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.98: preferred, colored; next MAIN 1.99: preferred, colored
Changes since revision 1.98: +12 -3
lines
Sync with HEAD
Revision 1.98.4.1: download - view: text, markup, annotated - select for diffs
Fri Apr 21 16:51:17 2017 UTC (7 years, 9 months ago) by bouyer
Branches: bouyer-socketcan
Diff to: previous 1.98: preferred, colored; next MAIN 1.99: preferred, colored
Changes since revision 1.98: +12 -3
lines
Sync with HEAD
Revision 1.100: download - view: text, markup, annotated - select for diffs
Thu Apr 13 02:15:36 2017 UTC (7 years, 10 months ago) by christos
Branches: MAIN
CVS tags: prg-localcount2-base3,
prg-localcount2-base2,
prg-localcount2-base1,
prg-localcount2-base,
prg-localcount2,
pgoyette-localcount-20170426,
pgoyette-compat-base,
pgoyette-compat-0330,
pgoyette-compat-0322,
pgoyette-compat-0315,
perseant-stdc-iso10646-base,
perseant-stdc-iso10646,
netbsd-8-base,
matt-nb8-mediatek-base,
matt-nb8-mediatek,
bouyer-socketcan-base1
Branch point for: pgoyette-compat,
netbsd-8
Diff to: previous 1.99: preferred, colored
Changes since revision 1.99: +3 -3
lines
remove env.
Revision 1.99: download - view: text, markup, annotated - select for diffs
Tue Mar 21 22:52:10 2017 UTC (7 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +12 -3
lines
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
Revision 1.98: download - view: text, markup, annotated - select for diffs
Sun Mar 6 18:49:42 2016 UTC (8 years, 11 months ago) by christos
Branches: MAIN
CVS tags: pgoyette-localcount-base,
pgoyette-localcount-20170320,
pgoyette-localcount-20170107,
pgoyette-localcount-20161104,
pgoyette-localcount-20160806,
pgoyette-localcount-20160726,
localcount-20160914,
bouyer-socketcan-base
Branch point for: pgoyette-localcount,
bouyer-socketcan
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +15 -1
lines
Introduce kat() a built-in version of cat(1) that strips shell-like comments.
Revision 1.94.2.1: download - view: text, markup, annotated - select for diffs
Sun Nov 8 00:45:22 2015 UTC (9 years, 3 months ago) by riz
Branches: netbsd-7
CVS tags: netbsd-7-nhusb-base-20170116,
netbsd-7-nhusb-base,
netbsd-7-nhusb,
netbsd-7-2-RELEASE,
netbsd-7-1-RELEASE,
netbsd-7-1-RC2,
netbsd-7-1-RC1,
netbsd-7-1-2-RELEASE,
netbsd-7-1-1-RELEASE,
netbsd-7-1
Diff to: previous 1.94: preferred, colored; next MAIN 1.95: preferred, colored
Changes since revision 1.94: +4 -14
lines
Pull up following revision(s) (requested by phx in ticket #1015):
etc/rc.subr: revision 1.97
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.
Revision 1.97: download - view: text, markup, annotated - select for diffs
Sat Oct 31 12:31:37 2015 UTC (9 years, 3 months ago) by phx
Branches: MAIN
Diff to: previous 1.96: preferred, colored
Changes since revision 1.96: +4 -14
lines
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.
Revision 1.96: download - view: text, markup, annotated - select for diffs
Tue Oct 7 19:09:45 2014 UTC (10 years, 4 months ago) by roy
Branches: MAIN
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +8 -5
lines
sleep for 0.05 seconds instead of 2 seconds when checking if the pids
are still alive for a much faster exit.
Revision 1.95: download - view: text, markup, annotated - select for diffs
Sun Sep 21 09:47:24 2014 UTC (10 years, 4 months ago) by roy
Branches: MAIN
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +21 -6
lines
Add checkyesnox function so we can test a configurable without
being warned of its non-existance.
Revision 1.91.2.2: download - view: text, markup, annotated - select for diffs
Tue Aug 19 23:45:50 2014 UTC (10 years, 5 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.91.2.1: preferred, colored; branchpoint 1.91: preferred, colored; next MAIN 1.92: preferred, colored
Changes since revision 1.91.2.1: +41 -12
lines
Rebase to HEAD as of a few days ago.
Revision 1.92.8.1: download - view: text, markup, annotated - select for diffs
Sun Aug 10 07:03:06 2014 UTC (10 years, 6 months ago) by tls
Branches: tls-earlyentropy
Diff to: previous 1.92: preferred, colored; next MAIN 1.93: preferred, colored
Changes since revision 1.92: +41 -12
lines
Rebase.
Revision 1.94: download - view: text, markup, annotated - select for diffs
Sun Jul 27 07:46:46 2014 UTC (10 years, 6 months ago) by apb
Branches: MAIN
CVS tags: tls-maxphys-base,
tls-earlyentropy-base,
netbsd-7-base,
netbsd-7-0-RELEASE,
netbsd-7-0-RC3,
netbsd-7-0-RC2,
netbsd-7-0-RC1,
netbsd-7-0-2-RELEASE,
netbsd-7-0-1-RELEASE,
netbsd-7-0
Branch point for: netbsd-7
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +39 -10
lines
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.
Revision 1.93: download - view: text, markup, annotated - select for diffs
Tue Jul 22 17:11:09 2014 UTC (10 years, 6 months ago) by wiz
Branches: MAIN
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +3 -3
lines
'file system' for consistency with documentation (instead of 'filesystem').
Revision 1.91.2.1: download - view: text, markup, annotated - select for diffs
Mon Feb 25 00:24:49 2013 UTC (11 years, 11 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +29 -1
lines
resync with head
Revision 1.88.2.2: download - view: text, markup, annotated - select for diffs
Wed Jan 23 00:04:29 2013 UTC (12 years ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.88.2.1: preferred, colored; branchpoint 1.88: preferred, colored; next MAIN 1.89: preferred, colored
Changes since revision 1.88.2.1: +29 -1
lines
sync with head
Revision 1.92: download - view: text, markup, annotated - select for diffs
Mon Dec 17 18:17:27 2012 UTC (12 years, 1 month ago) by apb
Branches: MAIN
CVS tags: yamt-pagecache-base9,
yamt-pagecache-base8,
riastradh-xf86-video-intel-2-7-1-pre-2-21-15,
riastradh-drm2-base3,
riastradh-drm2-base2,
riastradh-drm2-base1,
riastradh-drm2-base,
riastradh-drm2,
khorben-n900,
agc-symver-base,
agc-symver
Branch point for: tls-earlyentropy
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +29 -1
lines
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.
Revision 1.88.2.1: download - view: text, markup, annotated - select for diffs
Tue Apr 17 00:02:56 2012 UTC (12 years, 10 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +2 -2
lines
sync with head
Revision 1.88.4.1: download - view: text, markup, annotated - select for diffs
Mon Apr 9 18:05:28 2012 UTC (12 years, 10 months ago) by riz
Branches: netbsd-6
CVS tags: netbsd-6-1-RELEASE,
netbsd-6-1-RC4,
netbsd-6-1-RC3,
netbsd-6-1-RC2,
netbsd-6-1-RC1,
netbsd-6-1-5-RELEASE,
netbsd-6-1-4-RELEASE,
netbsd-6-1-3-RELEASE,
netbsd-6-1-2-RELEASE,
netbsd-6-1-1-RELEASE,
netbsd-6-1,
netbsd-6-0-RELEASE,
netbsd-6-0-RC2,
netbsd-6-0-RC1,
netbsd-6-0-6-RELEASE,
netbsd-6-0-5-RELEASE,
netbsd-6-0-4-RELEASE,
netbsd-6-0-3-RELEASE,
netbsd-6-0-2-RELEASE,
netbsd-6-0-1-RELEASE,
netbsd-6-0,
matt-nb6-plus-nbase,
matt-nb6-plus-base,
matt-nb6-plus
Diff to: previous 1.88: preferred, colored; next MAIN 1.89: preferred, colored
Changes since revision 1.88: +2 -2
lines
Pull up following revision(s) (requested by apb in ticket #170):
etc/rc.subr: revision 1.89
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.
Revision 1.91: download - view: text, markup, annotated - select for diffs
Sat Apr 7 17:28:44 2012 UTC (12 years, 10 months ago) by christos
Branches: MAIN
CVS tags: yamt-pagecache-base7,
yamt-pagecache-base6,
yamt-pagecache-base5,
yamt-pagecache-base4
Branch point for: tls-maxphys
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +0 -3
lines
back out change that makes onestart work, to be committed at some other time.
Revision 1.90: download - view: text, markup, annotated - select for diffs
Sat Apr 7 17:22:10 2012 UTC (12 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +4 -1
lines
give wedges to everyone
Revision 1.89: download - view: text, markup, annotated - select for diffs
Sat Apr 7 16:39:32 2012 UTC (12 years, 10 months ago) by apb
Branches: MAIN
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +2 -2
lines
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.
Revision 1.88: download - view: text, markup, annotated - select for diffs
Thu Aug 11 22:52:47 2011 UTC (13 years, 6 months ago) by apb
Branches: MAIN
CVS tags: yamt-pagecache-base3,
yamt-pagecache-base2,
yamt-pagecache-base,
netbsd-6-base
Branch point for: yamt-pagecache,
netbsd-6
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +73 -16
lines
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.
Revision 1.86.4.1: download - view: text, markup, annotated - select for diffs
Thu Jun 23 14:18:25 2011 UTC (13 years, 7 months ago) by cherry
Branches: cherry-xenmp
Diff to: previous 1.86: preferred, colored; next MAIN 1.87: preferred, colored
Changes since revision 1.86: +9 -2
lines
Catchup with rmind-uvmplock merge.
Revision 1.87: download - view: text, markup, annotated - select for diffs
Thu Jun 9 14:52:01 2011 UTC (13 years, 8 months ago) by christos
Branches: MAIN
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +9 -2
lines
PR/42642: Ed Ravin: Handle daemons that start with #!/usr/bin/env interp
Revision 1.73.2.1: download - view: text, markup, annotated - select for diffs
Fri Jan 7 01:53:32 2011 UTC (14 years, 1 month ago) by riz
Branches: netbsd-5
CVS tags: netbsd-5-2-RELEASE,
netbsd-5-2-RC1,
netbsd-5-2-3-RELEASE,
netbsd-5-2-2-RELEASE,
netbsd-5-2-1-RELEASE,
netbsd-5-2
Diff to: previous 1.73: preferred, colored; next MAIN 1.74: preferred, colored
Changes since revision 1.73: +23 -1
lines
Pull up following revision(s) (requested by enami in ticket #1504):
share/man/man8/rc.subr.8: revision 1.27
etc/rc.subr: revision 1.86
share/man/man5/ifconfig.if.5: revision 1.14
etc/rc.d/network: revision 1.61
Add a collapse_backslash_newline function to rc.subr.
Collapse <abckslash><newline> sequences in /etc/ifconfig.xxx files read
by /etc/rc.d/network. Fixes PR 41662 by Christoph Badura, which was
also reported independently by Jeremy C. Reed.
Revision 1.86: download - view: text, markup, annotated - select for diffs
Sun Sep 26 18:37:14 2010 UTC (14 years, 4 months ago) by apb
Branches: MAIN
CVS tags: matt-mips64-premerge-20101231,
cherry-xenmp-base,
bouyer-quota2-nbase,
bouyer-quota2-base,
bouyer-quota2
Branch point for: cherry-xenmp
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +23 -2
lines
Add a collapse_backslash_newline function to rc.subr.
Revision 1.85: download - view: text, markup, annotated - select for diffs
Tue Jun 8 18:04:17 2010 UTC (14 years, 8 months ago) by christos
Branches: MAIN
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +2 -2
lines
use modulo instead of logical and. from pooka
Revision 1.84: download - view: text, markup, annotated - select for diffs
Tue Jun 8 13:48:58 2010 UTC (14 years, 8 months ago) by christos
Branches: MAIN
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +4 -1
lines
explain why this code is there.
Revision 1.83: download - view: text, markup, annotated - select for diffs
Sun Jun 6 12:37:57 2010 UTC (14 years, 8 months ago) by christos
Branches: MAIN
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +3 -3
lines
fix conditional, from dholland.
Revision 1.82: download - view: text, markup, annotated - select for diffs
Fri Jun 4 18:42:54 2010 UTC (14 years, 8 months ago) by christos
Branches: MAIN
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +19 -1
lines
print human readable exit code.
Revision 1.81: download - view: text, markup, annotated - select for diffs
Mon Mar 15 18:59:47 2010 UTC (14 years, 11 months ago) by jmmv
Branches: MAIN
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +9 -4
lines
Allow the run_rc_command function in rc.subr to pass extra parameters to
the command being executed. This is to allow rc.d scripts to do:
run_rc_command "${@}"
instead of:
run_rc_command "${1}"
and let the command handler (start, stop, etc.) receive the arguments after
the command name.
None of the default commands allow extra arguments, and they will error out
if any are given. This is mostly useful for script-specific commands that
are only supposed to be used through the command line and, therefore, need
to provide a friendly interface.
Proposed in tech-userlevel@. No major objections except for some minor
concerns regarding whether this should be allowed or not at all. Note that
I'm not touching any of the rc.d scripts in the base system, so this is
effectively a no-op from the user point of view.
Revision 1.80: download - view: text, markup, annotated - select for diffs
Mon Sep 14 22:30:30 2009 UTC (15 years, 5 months ago) by apb
Branches: MAIN
CVS tags: matt-premerge-20091211
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +8 -5
lines
Fix some errors in the way scripts with "KEYWORD: interactive"
are handled. There was an inverted test, and "set $_args"
had the wrong scope (in several nearly-identical blocks of code).
Revision 1.79: download - view: text, markup, annotated - select for diffs
Mon Sep 14 12:05:12 2009 UTC (15 years, 5 months ago) by apb
Branches: MAIN
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +49 -12
lines
Add the ability for file systems mounted via mount_critical_filesystems()
in rc.subr to be marked as optional. This means that it's not an
error if the file system is not mentioned in /etc/fstab. It is
still an error if something else goes wrong.
Change the defaults for these two variables in /etc/defaults/rc.conf:
critical_filesystems_local="OPTIONAL:/var"
critical_filesystems_remote="OPTIONAL:/usr"
Revision 1.78: download - view: text, markup, annotated - select for diffs
Fri Sep 11 18:17:04 2009 UTC (15 years, 5 months ago) by apb
Branches: MAIN
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +172 -3
lines
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.
Revision 1.77: download - view: text, markup, annotated - select for diffs
Sat Sep 5 16:45:33 2009 UTC (15 years, 5 months ago) by apb
Branches: MAIN
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +2 -2
lines
Change multiple spaces to tabs on one line
Revision 1.76: download - view: text, markup, annotated - select for diffs
Fri Jul 10 20:02:21 2009 UTC (15 years, 7 months ago) by christos
Branches: MAIN
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +32 -1
lines
1. centralize the fsck error handling
2. don't check if root is on nfs
3. reboot -n if root was modified as the manual page suggests
Revision 1.74.2.1: download - view: text, markup, annotated - select for diffs
Wed May 13 19:18:02 2009 UTC (15 years, 9 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.74: preferred, colored; next MAIN 1.75: preferred, colored
Changes since revision 1.74: +5 -2
lines
Sync with HEAD.
Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
Revision 1.75: download - view: text, markup, annotated - select for diffs
Tue Apr 28 03:03:52 2009 UTC (15 years, 9 months ago) by reed
Branches: MAIN
CVS tags: jym-xensuspend-nbase,
jym-xensuspend-base
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +5 -2
lines
Get rid of extra space in Usage statement.
Revision 1.70.6.3: download - view: text, markup, annotated - select for diffs
Sat Jan 17 20:43:41 2009 UTC (16 years ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.70.6.2: preferred, colored; branchpoint 1.70: preferred, colored; next MAIN 1.71: preferred, colored
Changes since revision 1.70.6.2: +18 -2
lines
Sync with HEAD.
Revision 1.74: download - view: text, markup, annotated - select for diffs
Sat Dec 6 23:21:32 2008 UTC (16 years, 2 months ago) by salo
Branches: MAIN
CVS tags: mjf-devfs2-base2
Branch point for: jym-xensuspend
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +19 -3
lines
A very old patch sitting in my tree..
When rc scripts are started from interactive shell, be nice and when user
tries to start an unconfigured service, point him to rc.conf(5) and tell
him about the one* keyword. Also be more user friendly when an unknown
argument is entered.
Example:
# /etc/rc.d/cron start
$cron is not enabled - see rc.conf(5).
Use the following if you wish to perform the operation:
/etc/rc.d/cron onestart
# /etc/rc.d/cron nonsense
/etc/rc.d/cron: unknown directive 'nonsense'.
Usage: /etc/rc.d/cron [fast|force|one](start stop restart rcvar status poll)
Inspired by discussion on tech-userlevel:
http://mail-index.netbsd.org/tech-userlevel/2007/02/13/0010.html
http://mail-index.netbsd.org/tech-userlevel/2007/02/13/0011.html
http://mail-index.netbsd.org/tech-userlevel/2007/02/13/0012.html
Reminded about it and reviewed by <lukem>
Revision 1.71.2.2: download - view: text, markup, annotated - select for diffs
Thu Sep 18 04:41:08 2008 UTC (16 years, 4 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.71.2.1: preferred, colored; branchpoint 1.71: preferred, colored; next MAIN 1.72: preferred, colored
Changes since revision 1.71.2.1: +2 -2
lines
Sync with wrstuden-revivesa-base-2.
Revision 1.70.6.2: download - view: text, markup, annotated - select for diffs
Sun Jun 29 08:38:43 2008 UTC (16 years, 7 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.70.6.1: preferred, colored; branchpoint 1.70: preferred, colored
Changes since revision 1.70.6.1: +1 -1
lines
Sync with HEAD.
Revision 1.71.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 23 04:29:01 2008 UTC (16 years, 7 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +8 -2
lines
Sync w/ -current. 34 merge conflicts to follow.
Revision 1.73: download - view: text, markup, annotated - select for diffs
Mon Jun 23 03:26:18 2008 UTC (16 years, 7 months ago) by dholland
Branches: MAIN
CVS tags: wrstuden-revivesa-base-3,
wrstuden-revivesa-base-2,
netbsd-5-base,
netbsd-5-1-RELEASE,
netbsd-5-1-RC4,
netbsd-5-1-RC3,
netbsd-5-1-RC2,
netbsd-5-1-RC1,
netbsd-5-1-5-RELEASE,
netbsd-5-1-4-RELEASE,
netbsd-5-1-3-RELEASE,
netbsd-5-1-2-RELEASE,
netbsd-5-1-1-RELEASE,
netbsd-5-1,
netbsd-5-0-RELEASE,
netbsd-5-0-RC4,
netbsd-5-0-RC3,
netbsd-5-0-RC2,
netbsd-5-0-RC1,
netbsd-5-0-2-RELEASE,
netbsd-5-0-1-RELEASE,
netbsd-5-0,
mjf-devfs2-base,
matt-nb5-pq3-base,
matt-nb5-pq3,
matt-nb5-mips64-u2-k2-k4-k7-k8-k9,
matt-nb5-mips64-u1-k1-k5,
matt-nb5-mips64-premerge-20101231,
matt-nb5-mips64-premerge-20091211,
matt-nb5-mips64-k15,
matt-nb5-mips64,
matt-nb4-mips64-k7-u2a-k9b,
matt-mips64-base2
Branch point for: netbsd-5
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +2 -2
lines
fix typo
Revision 1.70.8.2: download - view: text, markup, annotated - select for diffs
Wed Jun 4 02:03:21 2008 UTC (16 years, 8 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.70.8.1: preferred, colored; branchpoint 1.70: preferred, colored; next MAIN 1.71: preferred, colored
Changes since revision 1.70.8.1: +8 -2
lines
sync with head
Revision 1.70.6.1: download - view: text, markup, annotated - select for diffs
Mon Jun 2 13:21:20 2008 UTC (16 years, 8 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +8 -9
lines
Sync with HEAD.
Revision 1.72: download - view: text, markup, annotated - select for diffs
Thu May 22 14:03:26 2008 UTC (16 years, 8 months ago) by he
Branches: MAIN
CVS tags: yamt-pf42-base4,
yamt-pf42-base3,
wrstuden-revivesa-base-1,
wrstuden-revivesa-base
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +8 -2
lines
Add support for optionally setting some environment variables before
starting ${command}, via ${name}_env.
Discussed with lukem.
Revision 1.70.8.1: download - view: text, markup, annotated - select for diffs
Sun May 18 12:29:47 2008 UTC (16 years, 9 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +1 -8
lines
sync with head.
Revision 1.71: download - view: text, markup, annotated - select for diffs
Wed Apr 30 13:10:49 2008 UTC (16 years, 9 months ago) by martin
Branches: MAIN
CVS tags: yamt-pf42-base2,
hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +1 -8
lines
Convert TNF licenses to new 2 clause variant
Revision 1.69.4.1: download - view: text, markup, annotated - select for diffs
Wed Jan 9 01:29:50 2008 UTC (17 years, 1 month ago) by matt
Branches: matt-armv6
Diff to: previous 1.69: preferred, colored; next MAIN 1.70: preferred, colored
Changes since revision 1.69: +2 -12
lines
sync with HEAD
Revision 1.70.2.2: download - view: text, markup, annotated - select for diffs
Mon Dec 31 15:31:41 2007 UTC (17 years, 1 month ago) by ad
Branches: mjf-devfs
Diff to: previous 1.70.2.1: preferred, colored; branchpoint 1.70: preferred, colored; next MAIN 1.71: preferred, colored
Changes since revision 1.70.2.1: +915 -0
lines
Remove systrace. Ok core@.
Revision 1.70.2.1
Mon Dec 31 15:31:40 2007 UTC (17 years, 1 month ago) by ad
Branches: mjf-devfs
FILE REMOVED
Changes since revision 1.70: +0 -915
lines
file rc.subr was added on branch mjf-devfs on 2007-12-31 15:31:41 +0000
Revision 1.70: download - view: text, markup, annotated - select for diffs
Mon Dec 31 15:31:40 2007 UTC (17 years, 1 month ago) by ad
Branches: MAIN
CVS tags: yamt-pf42-baseX,
yamt-pf42-base,
mjf-devfs-base,
matt-armv6-nbase,
matt-armv6-base,
keiichi-mipv6-base,
keiichi-mipv6,
hpcarm-cleanup-base
Branch point for: yamt-pf42,
mjf-devfs2,
mjf-devfs
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +2 -12
lines
Remove systrace. Ok core@.
Revision 1.69: download - view: text, markup, annotated - select for diffs
Fri Apr 6 14:20:08 2007 UTC (17 years, 10 months ago) by apb
Branches: MAIN
CVS tags: matt-mips64-base,
matt-mips64,
matt-armv6-prevmlocking,
hpcarm-cleanup,
cube-autoconf-base,
cube-autoconf
Branch point for: matt-armv6
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +16 -1
lines
* Add a stop_boot() function in rc.subr, to terminate a multi-user boot
by killing the parent process. The parent's PID is saved in $RC_PID.
* In all rc.d/* scripts that previously tried to stop the boot,
replace in-line code with "stop_boot".
* Document this.
This should fix PR 29822.
Revision 1.67.2.1: download - view: text, markup, annotated - select for diffs
Sat Feb 10 14:17:21 2007 UTC (18 years ago) by tron
Branches: netbsd-4
CVS tags: wrstuden-fixsa-newbase,
wrstuden-fixsa-base-1,
wrstuden-fixsa-base,
wrstuden-fixsa,
netbsd-4-0-RELEASE,
netbsd-4-0-RC5,
netbsd-4-0-RC4,
netbsd-4-0-RC3,
netbsd-4-0-RC2,
netbsd-4-0-RC1,
netbsd-4-0-1-RELEASE,
netbsd-4-0
Diff to: previous 1.67: preferred, colored; next MAIN 1.68: preferred, colored
Changes since revision 1.67: +3 -3
lines
Pull up following revision(s) (requested by hubertf in ticket #433):
etc/rc.subr: revision 1.68
_find_processes(): in addition to the existing "interpreter: /path/to/daemon"
also recognize "interpreter: daemon" in ps(1) output.
That case statement should be rewritten with expr(1) if more flexibility is
needed.
Fixes PR 35366 by Dominik Joe Pantucek, debugged with much assistance
by him on IRC.
Revision 1.68: download - view: text, markup, annotated - select for diffs
Sat Jan 27 14:30:26 2007 UTC (18 years ago) by hubertf
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +3 -3
lines
_find_processes(): in addition to the existing "interpreter: /path/to/daemon"
also recognize "interpreter: daemon" in ps(1) output.
That case statement should be rewritten with expr(1) if more flexibility is
needed.
Fixes PR 35366 by Dominik Joe Pantucek, debugged with much assistance
by him on IRC.
Revision 1.67: download - view: text, markup, annotated - select for diffs
Sat Oct 7 11:25:15 2006 UTC (18 years, 4 months ago) by elad
Branches: MAIN
CVS tags: netbsd-4-base
Branch point for: netbsd-4
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +2 -2
lines
PR/32004: Ed Ravin: command interpreter test in rc.subr doesn't accomodate
chroots
Patch applied, thanks!
okay apb@
Revision 1.61.4.2: download - view: text, markup, annotated - select for diffs
Fri Apr 21 21:48:23 2006 UTC (18 years, 9 months ago) by tron
Branches: netbsd-2
Diff to: previous 1.61.4.1: preferred, colored; branchpoint 1.61: preferred, colored; next MAIN 1.62: preferred, colored
Changes since revision 1.61.4.1: +6 -3
lines
Pull up following revision(s) (requested by he in ticket #10413):
etc/rc.subr: revision 1.66
In order to handle some perl scripts running as daemons, add a
pattern which also matches "`basename $interpreter`: $command" in the
ps listing. Should fix PR#31932.
Revision 1.65.2.1: download - view: text, markup, annotated - select for diffs
Tue Apr 4 21:45:42 2006 UTC (18 years, 10 months ago) by tron
Branches: netbsd-3
CVS tags: netbsd-3-1-RELEASE,
netbsd-3-1-RC4,
netbsd-3-1-RC3,
netbsd-3-1-RC2,
netbsd-3-1-RC1,
netbsd-3-1-1-RELEASE,
netbsd-3-1
Diff to: previous 1.65: preferred, colored; next MAIN 1.66: preferred, colored
Changes since revision 1.65: +6 -3
lines
Pull up following revision(s) (requested by he in ticket #1238):
etc/rc.subr: revision 1.66
In order to handle some perl scripts running as daemons, add a
pattern which also matches "`basename $interpreter`: $command" in the
ps listing. Should fix PR#31932.
Revision 1.66: download - view: text, markup, annotated - select for diffs
Sat Apr 1 10:05:50 2006 UTC (18 years, 10 months ago) by he
Branches: MAIN
CVS tags: abandoned-netbsd-4-base,
abandoned-netbsd-4
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +6 -3
lines
In order to handle some perl scripts running as daemons, add a
pattern which also matches "`basename $interpreter`: $command" in the
ps listing. Should fix PR#31932.
Revision 1.61.4.1: download - view: text, markup, annotated - select for diffs
Sun May 8 13:57:39 2005 UTC (19 years, 9 months ago) by riz
Branches: netbsd-2
CVS tags: netbsd-2-1-RELEASE,
netbsd-2-1-RC6,
netbsd-2-1-RC5,
netbsd-2-1-RC4,
netbsd-2-1-RC3,
netbsd-2-1-RC2,
netbsd-2-1-RC1,
netbsd-2-1
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +23 -4
lines
Pull up revision 1.65 (requested by lukem in ticket #1268):
* Implement
load_rc_config_var cmd var
to load the rc.conf(5) configuration for cmd and set var in the
current shell, using 'load_rc_config var' in a sub-shell to avoid
unwanted side-effects.
* Improve required_vars warning message.
Revision 1.65: download - view: text, markup, annotated - select for diffs
Tue Oct 12 14:45:29 2004 UTC (20 years, 4 months ago) by lukem
Branches: MAIN
CVS tags: netbsd-3-base,
netbsd-3-0-RELEASE,
netbsd-3-0-RC6,
netbsd-3-0-RC5,
netbsd-3-0-RC4,
netbsd-3-0-RC3,
netbsd-3-0-RC2,
netbsd-3-0-RC1,
netbsd-3-0-3-RELEASE,
netbsd-3-0-2-RELEASE,
netbsd-3-0-1-RELEASE,
netbsd-3-0
Branch point for: netbsd-3
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +23 -4
lines
* Implement
load_rc_config_var cmd var
to load the rc.conf(5) configuration for cmd and set var in the
current shell, using 'load_rc_config var' in a sub-shell to avoid
unwanted side-effects.
* Improve required_vars warning message.
Revision 1.64: download - view: text, markup, annotated - select for diffs
Fri Aug 13 18:08:03 2004 UTC (20 years, 6 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +3 -1
lines
Add an _rc_subr_loaded variable, set to ":" by rc.subr. Scripts can use this
for a speedup by doing:
$_rc_subr_loaded . /etc/rc.subr
Revision 1.63: download - view: text, markup, annotated - select for diffs
Mon May 3 14:52:26 2004 UTC (20 years, 9 months ago) by lukem
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +6 -6
lines
When performing "start", "stop" or "reload" in run_rc_command(),
send any "<name> already running" or "<name> not running" messages
to stderr instead of stdout before the (existing) non-zero exit.
Revision 1.62: download - view: text, markup, annotated - select for diffs
Fri Apr 2 13:13:47 2004 UTC (20 years, 10 months ago) by jmmv
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +4 -2
lines
Introduce and use the rcvar_manpage variable, which contains the manual page
name where the user should look at for documentation about rcvar. It defaults
to 'rc.subr(5)', as rc.subr is mainly used by rc.d scripts.
This variable is useful to let the daily, weekly, monthly and security scripts
tune the warning message shown when any of the variables they handle is not
properly set.
Closes PR misc/23908.
Revision 1.61: download - view: text, markup, annotated - select for diffs
Tue Jan 6 00:52:24 2004 UTC (21 years, 1 month ago) by lukem
Branches: MAIN
CVS tags: netbsd-2-base,
netbsd-2-0-base,
netbsd-2-0-RELEASE,
netbsd-2-0-RC5,
netbsd-2-0-RC4,
netbsd-2-0-RC3,
netbsd-2-0-RC2,
netbsd-2-0-RC1,
netbsd-2-0-3-RELEASE,
netbsd-2-0-2-RELEASE,
netbsd-2-0-1-RELEASE,
netbsd-2-0
Branch point for: netbsd-2
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +17 -7
lines
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)".
Revision 1.60: download - view: text, markup, annotated - select for diffs
Sat Jul 26 05:13:47 2003 UTC (21 years, 6 months ago) by lukem
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +2 -2
lines
Add "*,v" to the list of scratch files to skip.
Suggested by Johnny Lam / Alistair Crooks
Revision 1.59: download - view: text, markup, annotated - select for diffs
Fri Jul 4 14:14:10 2003 UTC (21 years, 7 months ago) by lukem
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +1 -7
lines
Revert previous; the "return" if rc.subr had already loaded had issues
in some circumstances where run_rc_script()'s sourcing of an rc.d file
which then sourced rc.subr, the `optimisation' in rc.subr to "return as
we're already loaded" would finish more than just the inner-most sourcing.
I haven't tracked down the exact issue, but removing the `optimisation'
fixes the problem I noticed in starting up certain rc.d scripts, and
may fix [bin/22053] as well.
Revision 1.49.2.3: download - view: text, markup, annotated - select for diffs
Sun Jun 29 00:07:36 2003 UTC (21 years, 7 months ago) by grant
Branches: netbsd-1-6
CVS tags: netbsd-1-6-PATCH002-RELEASE,
netbsd-1-6-PATCH002-RC4,
netbsd-1-6-PATCH002-RC3,
netbsd-1-6-PATCH002-RC2,
netbsd-1-6-PATCH002-RC1,
netbsd-1-6-PATCH002
Diff to: previous 1.49.2.2: preferred, colored; branchpoint 1.49: preferred, colored; next MAIN 1.50: preferred, colored
Changes since revision 1.49.2.2: +2 -2
lines
Pull up revision 1.57 (requested by lukem in ticket #1346):
run_rc_command(): when checking if ${command} exists before executing it,
be sure to check under ${name_chroot} (if set).
Fix from Ed Ravin in [bin/18523]
Revision 1.58: download - view: text, markup, annotated - select for diffs
Fri Jun 27 05:01:21 2003 UTC (21 years, 7 months ago) by lukem
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +7 -1
lines
If _rc_subr_loaded=true, "return" immediately, otherwise set that var
and continue as normal.
Gains ~ 2 seconds on 110 runs of ". rc.subr" on a shark.
Suggested by Andrew Cagney in [bin/18400]
Revision 1.57: download - view: text, markup, annotated - select for diffs
Fri Jun 27 04:06:01 2003 UTC (21 years, 7 months ago) by lukem
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +2 -2
lines
run_rc_command(): when checking if ${command} exists before executing it,
be sure to check under ${name_chroot} (if set).
Fix from Ed Ravin in [bin/18523]
Revision 1.56: download - view: text, markup, annotated - select for diffs
Tue Jun 3 14:00:45 2003 UTC (21 years, 8 months ago) by christos
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +4 -4
lines
Use more concise shell syntax:
1. for i in $* -> for i
2. foo=$* -> foo="$@"
Revision 1.55: download - view: text, markup, annotated - select for diffs
Sun Jan 5 22:59:35 2003 UTC (22 years, 1 month ago) by lukem
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +3 -1
lines
Fix logic error I introduced recently into mount_critical_filesystems().
Noted by kilbi@rad.rwth-aachen.de in [bin/19703].
Revision 1.54: download - view: text, markup, annotated - select for diffs
Sun Jan 5 11:40:29 2003 UTC (22 years, 1 month ago) by lukem
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +4 -2
lines
'if ! command;' is not POSIX sh, even though our /bin/sh supports it
Revision 1.53: download - view: text, markup, annotated - select for diffs
Sat Jan 4 15:27:44 2003 UTC (22 years, 1 month ago) by lukem
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +8 -8
lines
Change how internal boolean variables are used to:
if ! ${_somevar:-false}; then
_somevar=true
fi
(Consisent, slightly quicker, and slightly cleaner)
Revision 1.49.2.2: download - view: text, markup, annotated - select for diffs
Sun Nov 24 15:42:37 2002 UTC (22 years, 2 months ago) by tron
Branches: netbsd-1-6
CVS tags: netbsd-1-6-PATCH001-RELEASE,
netbsd-1-6-PATCH001-RC3,
netbsd-1-6-PATCH001-RC2,
netbsd-1-6-PATCH001-RC1,
netbsd-1-6-PATCH001
Diff to: previous 1.49.2.1: preferred, colored; branchpoint 1.49: preferred, colored
Changes since revision 1.49.2.1: +1 -1
lines
Pull up revision 1.52 (requested by abs in ticket #732):
Append ' - see rc.conf(5)' to unset variable warning:
/etc/rc.d/fu: WARNING: $fu is not set properly - see rc.conf(5).
Add a note to rc.conf that third party packages may test for additional
variables.
Revision 1.52: download - view: text, markup, annotated - select for diffs
Mon Aug 26 17:46:57 2002 UTC (22 years, 5 months ago) by abs
Branches: MAIN
CVS tags: fvdl_fs64_base
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +2 -2
lines
Append ' - see rc.conf(5)' to unset variable warning:
/etc/rc.d/fu: WARNING: $fu is not set properly - see rc.conf(5).
Add a note to rc.conf that third party packages may test for additional
variables.
Revision 1.49.2.1: download - view: text, markup, annotated - select for diffs
Mon Jul 29 14:44:01 2002 UTC (22 years, 6 months ago) by lukem
Branches: netbsd-1-6
CVS tags: netbsd-1-6-RELEASE,
netbsd-1-6-RC3,
netbsd-1-6-RC2,
netbsd-1-6-RC1
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +7 -3
lines
Pull up revision 1.51 (requested by grant in ticket #551):
add test for /usr/bin/logger in warn/err.
Revision 1.51: download - view: text, markup, annotated - select for diffs
Thu Jul 25 14:34:46 2002 UTC (22 years, 6 months ago) by grant
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +7 -3
lines
add test for /usr/bin/logger in warn/err.
Revision 1.50: download - view: text, markup, annotated - select for diffs
Mon Jul 8 16:14:54 2002 UTC (22 years, 7 months ago) by atatat
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +12 -2
lines
Add systrace(1) support to rc.subr. Most services (eg, ${name} is
inetd) started from rc can now be run under systrace by setting
${name}_systrace to a set of flags to be passed to systrace. Note
that policies need to generated before you do this.
Revision 1.49: download - view: text, markup, annotated - select for diffs
Tue May 21 12:31:01 2002 UTC (22 years, 8 months ago) by lukem
Branches: MAIN
CVS tags: netbsd-1-6-base
Branch point for: netbsd-1-6
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +3 -1
lines
When using backup_uses_rcs=YES in backup_file(), after checking the file
in and setting -kb, check it out again, since the initial check in
trashes any RCSIDs (because -kb wasn't set at that time).
This stops the annoying situation where you add a new file (e.g, "foo")
which contains an RCSID and you get *two* notifications of differences
in two successives runs of /etc/security; the first when the file is
initially checked in and a second when diff finds the RCSID is different
(contains "foo.conf,v 1.1" instead of "foo,v 1.66").
Revision 1.48: download - view: text, markup, annotated - select for diffs
Thu Apr 18 07:18:05 2002 UTC (22 years, 10 months ago) by lukem
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +5 -5
lines
consistently set rc_(fast|force)=yes
Revision 1.47: download - view: text, markup, annotated - select for diffs
Wed Mar 27 08:53:42 2002 UTC (22 years, 10 months ago) by lukem
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +6 -9
lines
Replace $critical_filesystems_beforenet with $critical_filesystems_local .
Replace $critical_filesystems with $critical_filesystems_remote .
The new names are now consistent with the type argument that
mount_critical_filesystems() is called with, and allows for other types to
be easily supported by that function.
For backwards compatibility purposes, if the now obsolete variable is defined
(even empty), it takes precedence over the new form, and you will be warned.
If you want to stop the warnings, update your rc.conf(5) settings!
Revision 1.46: download - view: text, markup, annotated - select for diffs
Fri Mar 22 04:16:38 2002 UTC (22 years, 10 months ago) by lukem
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +96 -77
lines
- 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].
Revision 1.45: download - view: text, markup, annotated - select for diffs
Thu Mar 21 12:21:00 2002 UTC (22 years, 10 months ago) by lukem
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +82 -38
lines
- Add run_rc_command() control variable $command_interpreter
If set, the first line of $command is read, the leading #! is
removed, whitespace is normalised, the first word is checked
against $command_interpreter, and the result is used as the
string to match in the ps(1) output.
This code isn't infallable, but works for common cases such as
#!/bin/sh
#! /usr/pkg/bin/perl -w
This helps solve the problem described in [bin/15563], and by
Ed Ravin on tech-userlevel.
- Move the common elements of check_process() and check_pidfile() into
_find_processes(), and call appropriately.
Revision 1.44: download - view: text, markup, annotated - select for diffs
Wed Mar 13 06:58:34 2002 UTC (22 years, 11 months ago) by lukem
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +5 -2
lines
Use ${_arg}_postcmd even if we're not using the default ${_arg}_cmd method.
Revision 1.43: download - view: text, markup, annotated - select for diffs
Wed Mar 13 04:50:08 2002 UTC (22 years, 11 months ago) by lukem
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +41 -7
lines
Implement ${_arg}_postcmd support, which is run if a default
start/stop/reload/restart operation succeeds (i.e, zero exit code).
Code from Lubomir Sedlacik <salo@Xtrmntr.org>.
Revision 1.42: download - view: text, markup, annotated - select for diffs
Mon Feb 25 12:49:34 2002 UTC (22 years, 11 months ago) by lukem
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +26 -11
lines
Fixes derived from [bin/15563] submitted by Ron Roskens:
- Don't su(1) to ${name}_user if running as that user.
- Support $procname as the name of the process to search for.
Defaults to the value of $command.
Revision 1.41: download - view: text, markup, annotated - select for diffs
Mon Feb 25 08:11:23 2002 UTC (22 years, 11 months ago) by lukem
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +3 -3
lines
fix spelo. crank copyright year
Revision 1.40: download - view: text, markup, annotated - select for diffs
Mon Feb 25 07:12:47 2002 UTC (22 years, 11 months ago) by lukem
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +3 -3
lines
Don't run "status" as if "force" is set, thus reverting part of rev 1.29.
I can't remember the rationale for why I made that change in the first place,
and there's been some good arguments presented to me as to why the rcvar
should be checked before status is run.
Revision 1.39: download - view: text, markup, annotated - select for diffs
Mon Feb 25 06:58:14 2002 UTC (22 years, 11 months ago) by lukem
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +19 -23
lines
run_rc_script() improvements:
- always unset the variables used by run_rc_command() before sourcing an
rc.d script, rather than just when rc_fast_and_loose is in effect.
this allows run_rc_command() to be used in .sh scripts (with care).
- remove comment describing now-former limitation of .sh scripts.
- make the rc_fast_and_loose check only after the `` not *.sh / not scratch
/ script-is-executable '' checks. rc_fast_and_loose now behaves a lot more
like the normal operation, in that it skips scratch files and
non-executable files
Revision 1.38: download - view: text, markup, annotated - select for diffs
Mon Nov 19 03:18:32 2001 UTC (23 years, 2 months ago) by lukem
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +13 -1
lines
Add reverse_list(), which prints the reverse of the list of words.
Doesn't attempt to handle words with whitespace, etc.
Revision 1.37: download - view: text, markup, annotated - select for diffs
Mon Jun 18 06:53:45 2001 UTC (23 years, 8 months ago) by lukem
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +11 -5
lines
Improve run_rc_script():
- Skip files that end with `~', `#', `.OLD' or `.orig', as these are usually
scratch or backup files created by programs, and we don't want to start them.
- Only try and run non `.sh' files if they're executable.
Per discussions with Andrew Brown, and closing his PR [bin/9981].
Revision 1.36: download - view: text, markup, annotated - select for diffs
Thu May 10 14:04:22 2001 UTC (23 years, 9 months ago) by atatat
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +12 -7
lines
When using rcs to track backups, force the rcs archive to be unlocked,
use only non-strict locking, and leave the archives unlocked after
checking in changes.
Revision 1.35: download - view: text, markup, annotated - select for diffs
Wed May 9 16:40:59 2001 UTC (23 years, 9 months ago) by lukem
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +18 -13
lines
* change wait_for_pids() to spin forever (rather than just ~ 65 seconds).
* change the default `stop' case to wait_for_pids after kill $sig_stop.
this means that "/etc/rc.d/foo stop" won't return until the service
has shut down. third party scripts that implement their own stop mechanism
should offer this functionality as well.
* in the default restart case, don't bother doing `$0 poll' in between
stop & start, because of the change above. (XXX: deprecate poll ?)
Revision 1.34: download - view: text, markup, annotated - select for diffs
Mon May 7 07:07:11 2001 UTC (23 years, 9 months ago) by lukem
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +13 -8
lines
Don't try and use single quotes in the RHS of a ${ :+ } expansion
because /bin/sh needs a different syntax than ksh (and bash, etc).
Use a more obvious and less error prone method. (This complicated
use of ${:+} was only used to build the su command when running as
a separate user, but could always cause problems.)
Problem noted by Hubert Feyrer in conjunction with /etc/rc.d/sshd.
Revision 1.33: download - view: text, markup, annotated - select for diffs
Wed Apr 18 01:31:40 2001 UTC (23 years, 10 months ago) by lukem
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +47 -6
lines
* provide wait_for_pids(), which spins until all the given pids don't exist
* run_rc_command():
- add support for "poll", which by default, uses wait_for_pids() on
the list of matching processes
- in the "restart" case, call "poll" between "stop" and "start"
this fixes the situation where certain services (e.g, amd, squid) would
take a bit longer to shutdown after receiving the kill signal to shutdown,
and "/etc/rc.d/foo restart" would fail in the `start' phase.
Revision 1.32: download - view: text, markup, annotated - select for diffs
Fri Apr 6 06:48:35 2001 UTC (23 years, 10 months ago) by lukem
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +3 -3
lines
clarify that ${name}_groups is comma separated
Revision 1.31: download - view: text, markup, annotated - select for diffs
Wed Apr 4 03:17:19 2001 UTC (23 years, 10 months ago) by atatat
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +80 -1
lines
Provide the capability of storing backups via RCS instead of just a
"current" and a "last" (which is useless if you wanna know what you
changed last week). Set the default to on.
Revision 1.30: download - view: text, markup, annotated - select for diffs
Wed Feb 28 16:49:19 2001 UTC (23 years, 11 months ago) by lukem
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +41 -34
lines
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
Revision 1.29: download - view: text, markup, annotated - select for diffs
Fri Nov 17 03:47:43 2000 UTC (24 years, 3 months ago) by lukem
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +17 -5
lines
* always run `status'; i.e, ignore the setting of $rcvar just like `rcvar' does.
* don't barf if `force' is used and $rcvar isn't set by the script
* only do the guts of `restart' once, by setting _rc_restart_done after the
first run through. this stops scripts which call run_rc_command more than
once (such as nfslocking) from doing the ``stop everything/start everything''
sequence n times.
Revision 1.28: download - view: text, markup, annotated - select for diffs
Mon Nov 6 00:08:30 2000 UTC (24 years, 3 months ago) by lukem
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +2 -1
lines
when doing `status', return non-zero if the program isn't running.
request by thorpej.
Revision 1.27: download - view: text, markup, annotated - select for diffs
Sun Nov 5 23:48:14 2000 UTC (24 years, 3 months ago) by lukem
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +3 -3
lines
when running `forcerestart', call the underlying `stop' and `start'
with the `force' prefix as well
Revision 1.26: download - view: text, markup, annotated - select for diffs
Sat Oct 7 07:36:56 2000 UTC (24 years, 4 months ago) by lukem
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +3 -3
lines
use ${foo##*/} instead of `basename $foo`. as suggested (with minor variation)
by Toru Nishimura <nisimura@itc.aist-nara.ac.jp>
Revision 1.20.2.4: download - view: text, markup, annotated - select for diffs
Mon Oct 2 01:02:49 2000 UTC (24 years, 4 months ago) by lukem
Branches: netbsd-1-5
CVS tags: netbsd-1-5-RELEASE,
netbsd-1-5-PATCH003,
netbsd-1-5-PATCH002,
netbsd-1-5-PATCH001,
netbsd-1-5-BETA2,
netbsd-1-5-BETA
Diff to: previous 1.20.2.3: preferred, colored; branchpoint 1.20: preferred, colored; next MAIN 1.21: preferred, colored
Changes since revision 1.20.2.3: +3 -3
lines
pull up rev 1.25 (approved by thorpej):
remove unnecessary leading `$' on warnings printed for
$required_dirs and $required_files.
Revision 1.20.2.3: download - view: text, markup, annotated - select for diffs
Mon Oct 2 00:33:23 2000 UTC (24 years, 4 months ago) by lukem
Branches: netbsd-1-5
Diff to: previous 1.20.2.2: preferred, colored; branchpoint 1.20: preferred, colored
Changes since revision 1.20.2.2: +109 -58
lines
pull up rev 1.24 (approved by thorpej):
large changes. summary:
- always use $rcvar to determine the name of the var to checkyesno
- fix force*
Revision 1.25: download - view: text, markup, annotated - select for diffs
Sun Oct 1 10:10:18 2000 UTC (24 years, 4 months ago) by lukem
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +3 -3
lines
remove unnecessary leading `$' on warnings printed for $required_dirs
and $required_files.
Revision 1.24: download - view: text, markup, annotated - select for diffs
Tue Sep 19 13:04:38 2000 UTC (24 years, 4 months ago) by lukem
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +109 -58
lines
- only perform the checkyesno on the variable named in $rcvar (rather than
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
Revision 1.20.2.2: download - view: text, markup, annotated - select for diffs
Wed Aug 23 11:31:54 2000 UTC (24 years, 5 months ago) by lukem
Branches: netbsd-1-5
Diff to: previous 1.20.2.1: preferred, colored; branchpoint 1.20: preferred, colored
Changes since revision 1.20.2.1: +19 -4
lines
pull up revs 1.22-1.23:
add ${name}_chroot support
approved: thorpej
Revision 1.23: download - view: text, markup, annotated - select for diffs
Sat Aug 19 08:47:43 2000 UTC (24 years, 6 months ago) by lukem
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +3 -3
lines
support ${name}_nice even when using ${name}_chroot. per discussion with mrg...
Revision 1.22: download - view: text, markup, annotated - select for diffs
Thu Aug 17 11:07:10 2000 UTC (24 years, 6 months ago) by lukem
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +20 -5
lines
add support for ${name}_chroot, which chroot(8)s before running the command.
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 :-]
Revision 1.20.2.1: download - view: text, markup, annotated - select for diffs
Wed Aug 9 18:40:25 2000 UTC (24 years, 6 months ago) by lukem
Branches: netbsd-1-5
CVS tags: netbsd-1-5-ALPHA2
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +5 -5
lines
pull up rev 1.21
approved by: thorpej
1.21:
in err() and warn() put a : between the ERROR/WARNING label
and the message
Revision 1.21: download - view: text, markup, annotated - select for diffs
Thu Jul 20 23:12:44 2000 UTC (24 years, 6 months ago) by lukem
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +5 -5
lines
in err() and warn() put a : between the ERROR/WARNING label and the message
Revision 1.19.2.1: download - view: text, markup, annotated - select for diffs
Fri Jun 23 15:45:56 2000 UTC (24 years, 7 months ago) by minoura
Branches: minoura-xpg4dl
Diff to: previous 1.19: preferred, colored; next MAIN 1.20: preferred, colored
Changes since revision 1.19: +4 -2
lines
Sync w/ netbsd-1-5-base.
Revision 1.20: download - view: text, markup, annotated - select for diffs
Fri Jun 9 14:27:57 2000 UTC (24 years, 8 months ago) by fvdl
Branches: MAIN
CVS tags: netbsd-1-5-base
Branch point for: netbsd-1-5
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +4 -2
lines
Add and rc.conf.d directory. If a config file for command X exists
(/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
Revision 1.19: download - view: text, markup, annotated - select for diffs
Sat May 13 08:23:45 2000 UTC (24 years, 9 months ago) by lukem
Branches: MAIN
CVS tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +17 -1
lines
Implement load_rc_config(), which takes the config name as an argument.
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/*.
Revision 1.18: download - view: text, markup, annotated - select for diffs
Sat May 13 03:07:17 2000 UTC (24 years, 9 months ago) by lukem
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +20 -4
lines
implement three new variables for run_rc_command:
- ${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 :)
Revision 1.17: download - view: text, markup, annotated - select for diffs
Sun Apr 30 13:16:47 2000 UTC (24 years, 9 months ago) by lukem
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +14 -24
lines
- prefix some more local variables with `_' (when you have a convention,
stick to it :-)
- simplify run_rc_script (no need to support fast* or force* here...)
- clarify some comments
Revision 1.16: download - view: text, markup, annotated - select for diffs
Sun Apr 30 12:19:07 2000 UTC (24 years, 9 months ago) by lukem
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +8 -8
lines
change run_rc_command() to take the list of extra commands supported
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.
Revision 1.15: download - view: text, markup, annotated - select for diffs
Fri Apr 28 01:40:09 2000 UTC (24 years, 9 months ago) by lukem
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +9 -5
lines
in check_pidfile and check_process, also match "(" + `basename prog` + ")" .
noted by veego@
Revision 1.14: download - view: text, markup, annotated - select for diffs
Wed Apr 26 15:06:46 2000 UTC (24 years, 9 months ago) by lukem
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +1 -5
lines
don't bother checking rc_configured each time run_rc_command executes; once in /etc/rc is enough
Revision 1.13: download - view: text, markup, annotated - select for diffs
Sat Apr 22 03:01:22 2000 UTC (24 years, 9 months ago) by lukem
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +1 -7
lines
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).
Revision 1.12: download - view: text, markup, annotated - select for diffs
Wed Apr 19 04:26:22 2000 UTC (24 years, 10 months ago) by simonb
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +7 -1
lines
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.
Revision 1.11: download - view: text, markup, annotated - select for diffs
Fri Mar 10 11:39:27 2000 UTC (24 years, 11 months ago) by lukem
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +437 -33
lines
* add:
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
Revision 1.10: download - view: text, markup, annotated - select for diffs
Wed Jul 7 21:24:56 1999 UTC (25 years, 7 months ago) by drochner
Branches: MAIN
CVS tags: wrstuden-devbsize-base,
wrstuden-devbsize-19991221,
wrstuden-devbsize,
comdex-fall-1999-base,
comdex-fall-1999
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +7 -5
lines
repair diskless startup: "netstart" needs "sysctl" and "awk" now, thus
"/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...
Revision 1.9: download - view: text, markup, annotated - select for diffs
Wed Apr 28 23:32:29 1999 UTC (25 years, 9 months ago) by nathanw
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +2 -2
lines
Move the knowledge that /usr and /var should be mounted early from
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.
Revision 1.7.2.1: download - view: text, markup, annotated - select for diffs
Thu Apr 15 12:29:35 1999 UTC (25 years, 10 months ago) by cjs
Branches: netbsd-1-4
CVS tags: netbsd-1-4-RELEASE,
netbsd-1-4-PATCH003,
netbsd-1-4-PATCH002,
netbsd-1-4-PATCH001
Diff to: previous 1.7: preferred, colored; next MAIN 1.8: preferred, colored
Changes since revision 1.7: +2 -4
lines
Bring branch up to head revision 1.8.
Revision 1.8: download - view: text, markup, annotated - select for diffs
Tue Apr 13 02:15:49 1999 UTC (25 years, 10 months ago) by cjs
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +2 -4
lines
When checking local status, jJust ignore not-found filesystems, rather
than printing an error, just as we do when we try to mount it.
Revision 1.7: download - view: text, markup, annotated - select for diffs
Thu Apr 1 03:58:44 1999 UTC (25 years, 10 months ago) by cjs
Branches: MAIN
CVS tags: netbsd-1-4-base
Branch point for: netbsd-1-4
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +31 -1
lines
Change mount_critical_filesystems() so that if given an argument
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.
Revision 1.6: download - view: text, markup, annotated - select for diffs
Wed Mar 24 18:59:47 1999 UTC (25 years, 10 months ago) by mellon
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +22 -1
lines
- Move critical filesystem mounting code into a shell function and put
that in rc.subr.
- Support critfs_require_network rc.conf variable.
Revision 1.5: download - view: text, markup, annotated - select for diffs
Sat Feb 28 22:56:11 1998 UTC (26 years, 11 months ago) by lukem
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +6 -2
lines
improve description comment
Revision 1.4: download - view: text, markup, annotated - select for diffs
Sat Feb 28 22:54:02 1998 UTC (26 years, 11 months ago) by lukem
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +12 -7
lines
* add synonyms for "yes": "true", "on", and "1"
* add synonyms for "no": "false", "off", and "0"
* remove unnecessary trailing semicolons (this is sh, not C)
Revision 1.3: download - view: text, markup, annotated - select for diffs
Mon Jan 26 04:36:26 1998 UTC (27 years ago) by lukem
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +11 -7
lines
convert 'if .. else .. fi' into a 'case .. esac', and allow for any
uppercase/lowercase variations of 'yes' and 'no'. fixes [misc/4887]
sent in by "John F. Woods" <jfw@jfwhome.funhouse.com>
Revision 1.2: download - view: text, markup, annotated - select for diffs
Sat Aug 30 03:34:29 1997 UTC (27 years, 5 months ago) by cjs
Branches: MAIN
CVS tags: netbsd-1-3-base,
netbsd-1-3-RELEASE,
netbsd-1-3-PATCH003-CANDIDATE2,
netbsd-1-3-PATCH003-CANDIDATE1,
netbsd-1-3-PATCH003-CANDIDATE0,
netbsd-1-3-PATCH003,
netbsd-1-3-PATCH002,
netbsd-1-3-PATCH001,
netbsd-1-3-BETA,
netbsd-1-3
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +1 -9
lines
Prune unused function.
Revision 1.1: download - view: text, markup, annotated - select for diffs
Fri Aug 29 02:24:08 1997 UTC (27 years, 5 months ago) by cjs
Branches: MAIN
Split rc.conf variables for starting programs into two: an on/off
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.
CVSweb <webmaster@jp.NetBSD.org>