summaryrefslogtreecommitdiffstats
path: root/etc/rc.subr
Commit message (Collapse)AuthorAgeFilesLines
...
* o NetBSD rev. 1.60mtm2004-02-261-2/+2
| | | | | | | | | Add "*,v" to the list of scratch files to skip. Suggested by Johnny Lam / Alistair Crooks o Update NetBSD rcsid Obtained From: NetBSD
* NetBSD rev. 1.57mtm2004-02-261-1/+1
| | | | | | | | 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] Obtained From: NetBSD
* NetBSD rev. 1.56mtm2004-02-261-3/+3
| | | | | | | | Use more concise shell syntax: 1. for i in $* -> for i 2. foo=$* -> foo="$@" Obtained From: NetBSD
* NetBSD rev. 1.53, 1.54 and 1.55:mtm2004-02-261-7/+11
| | | | | | | | | | Change how internal boolean variables are used to: if ! ${_somevar:-false}; then _somevar=true fi (Consisent, slightly quicker, and slightly cleaner) Obtained from: NetBSD
* Since id(1) is in /usr, it may not be available until after filesystemmtm2004-01-221-1/+3
| | | | | | mounting. Reminded by: bde
* After setting a ruleset on a new devfs mount, apply it.cperciva2004-01-211-0/+1
| | | | | Approved by: phk, rwatson (mentor) PR: bin/61047
* o Rename devfs_link() to make_symlink() and turn it into a genericmtm2003-12-091-16/+17
| | | | | | symlinking routine. o Modify rc.d/jail to create its own symlink relative to the jail's filesystem
* o Reduce rc(8) startup clutter by turning the informational messagesmtm2003-08-201-4/+8
| | | | | | | | off by default. o Apparently the routine displaying the informational messages wasn't checking its knob in rc.conf, so fix that as well. Requested by: obrien
* Add a general mechanism for creating and applyingmtm2003-08-201-0/+218
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | devfs(8) rules in rc(8). It is most useful for applying rules to devfs(5) mount points in /dev or inside jails. The following line of script is sufficient to mount a relatively useful+secure devfs(5) in a jail: devfs_mount_jail /some/jail/dev Some new shell routines available to scripts that source rc.subr(5): o devfs_link - Makes it a little easier to create symlinks o devfs_init_rulesets - Create devfs(8) rulesets from devfs.rules o devfs_set_ruleset - Set a ruleset to a devfs(5) mount o devfs_apply_ruleset - Apply a ruleset to a devfs(5) mount o devfs_domount - Mount devfs(5) and apply some ruleset o devfs_mount_jail - Mount devfs(5) and apply a ruleset appropriate to jails. Additional rulesets can be specified in /etc/devfs.rules. If the devfs_system_ruleset variable is defined in rc.conf and it contains the name of a ruleset defined in /etc/defaults/devfs.rules or user supplied rulesets in /etc/devfs.rules then that ruleset will be applied to /dev at startup by the /etc/rc.d/devfs script. It can also be applied post-startup: /etc/rc.d/devfs start This is a more flexible mechanism than the previous method of using /etc/devfs.conf. However, that method is still available. Note: since devfs(8) doesn't provide any way for creating symlinks as part of a ruleset, anyone wishing to create symlinks in a devfs(5) as part of the bootup sequence will still have to rely on /etc/devfs.conf.
* Missing quotes around a variable. In this case we are onlymtm2003-07-241-1/+1
| | | | | | | evaluating the $_precmd command as a string. We're not actually trying to evaluate the contents of the command. Reported by: Glenn Johnson <gjohnson@srrc.ars.usda.gov>
* Previously, a "forced" command always exited successfully (with themtm2003-06-091-37/+65
| | | | | | | | | exception of the default 'status' command) regardless of whether the executed command was actually successfull or not. Forced scripts should always correctly reflect the outcome of the command. NOTE: exit values are treated as booleans. We don't care what the actual exit value was, only whether it was successfull or not.
* The dhcp_program and dhcp_flags variables have to be renamed tomtm2003-06-071-0/+2
| | | | | | | | | | | | | | take advantage of the rc.subr(8) glue. They are renamed dhclient_program and dhclient_flags. o Rename them in rc.conf(5) o Rename them in /etc/defaults/rc.conf o Add the deprecated variables to /etc/rc.subr o Isolate the use of the 'command' variable to the NetBSD specific parts in /etc/rc.d/dhclient. o Now that dhcp_flags has also been renamed it will be applied properly by rc.subr(8) glue code. Reported by: John Nielsen <john@jnielsen.net>
* This particular debugging statement is very verbose, making the restmtm2003-04-301-1/+1
| | | | | | | of the debug output hard to follow. Comment it out. It's commented out in NetBSD's version as well. Approved by: markm (mentor)(implicit)
* Write out the debug messages (from the previous commit) only ifmtm2003-01-201-5/+11
| | | | | | the evaluated command exists. Approved by: markm (mentor)(implicit)
* Make the debug messages, for when a script rolls its own start routine,mtm2003-01-181-1/+5
| | | | | | | more usefull. Currently it just says 'xxx_cmd'; whereas with this change it will name the routine that's being run. Approved by: markm (mentor)
* By popular demand, make the debug log to syslog.gordon2002-11-091-1/+3
| | | | Remove an extraneous return too.
* Diff reduction to NetBSD:gordon2002-11-081-19/+16
| | | | | | | | | | | | | Fix a minor grammer nit. Get rid of _echo that uses logger and just call logger in the 3 routines that need it. Add a comment referencing rc.conf(5) in the case of an incorrectly set variable. This pulls rc.subr up to 1.51 of rc.subr. I skipped 1.49 (systrace support) since I don't have systrace. Obtained from: NetBSD
* Remove the sourceing of rc.conf from the debug subroutine. This causedgordon2002-09-121-5/+0
| | | | problems when you try to override variables locally.
* Add a support for a ${OSTYPE} which is set once in /etc/rc.subr. Also convertgordon2002-09-061-3/+4
| | | | | | all instances of `${CMD_OSTYPE}` to just using ${OSTYPE}. This saves us a shell invocation on anything that is OS-dependent. I seriously doubt that we will be spontaneously changing OS types during bootup.
* Clean up some variables that should have been done before:gordon2002-08-141-1/+15
| | | | | | | | | | | xntpd_* -> ntpd_* portmap_* -> rpcbind_* Also change single_mountd_enable to mountd_enable. We also include shims for all the old variable names. Submitted by: Mike Makonnen <makonnen@pacbell.net>
* Bring this up to date with the latest NetBSD bits. Also add some bits ofgordon2002-06-131-145/+545
| | | | | | | our own. Submitted by: Mike Makonnen Reviewed by: silence on -current and -hackers
* Usage style sweep: spell "usage" with a small 'u'.des2002-04-221-1/+1
| | | | | Also change one case of blatant __progname abuse (several more remain) This commit does not touch anything in src/{contrib,crypto,gnu}/.
* Import the NetBSD 1.5 RC system.obrien2001-06-161-0/+586
Note that `rc' and `rc.shutdown' could not be imported because we already have files with those names.
OpenPOWER on IntegriCloud