summaryrefslogtreecommitdiffstats
path: root/etc/rc
Commit message (Collapse)AuthorAgeFilesLines
* MFC r258894: Make rc(8) re-source rc.conf upon receipt of SIGALRM.cperciva2013-12-061-0/+5
| | | | | | | | | The rc system aggressively caches the contents of /etc/rc.conf in order to improve boot performance; this produces arguably astonishing (non-)results if /etc/rc.conf is modified during the boot process. This commit provides a mechanism for explicitly requesting that rc.conf be reloaded. Approved by: re (rodrigc)
* MFC r256775,r256776:cperciva2013-10-221-2/+22
| | | | | | | | | | Add support for "first boot" rc.d scripts. Document this new functionality in rc.conf(5) and rc(8). Bump __FreeBSD_version so that ports can make use of this. Approved by: re (gjb)
* Refine the "nojail" rc keyword, adding "nojailvnet" for files that don'tjamie2013-05-191-0/+3
| | | | | | | | | apply to most jails but do apply to vnet jails. This includes adding a new sysctl "security.jail.vnet" to identify vnet jails. PR: conf/149050 Submitted by: mdodd MFC after: 3 days
* Hide stty(1) errors.ed2012-03-141-1/+1
| | | | | | | | | | | | If rc(8) is executed without using a TTY, this error appears at the beginning: stty: stdin isn't a terminal Because this is to be expected and of course not harmful, it is better to simply hide the error message. MFC after: 1 week
* Rather than trusting that nothing is going to sneak in before thedougb2011-04-291-7/+4
| | | | | | | | | | | | | | | early_late_divider in the second run (and thus be skipped altogether), keep a list of the scripts run early, and use that list to skip things in the second run. This has the primary benefit of not skipping a local script that gets ordered too early in the second run. It also gives an opportunity to clean up/simplify the code a bit. Use a space-separated list rather than the more traditional colon for maximum insurance against creativity in local naming conventions. Reviewed by: brooks
* Remove pointless informational message.mtm2008-06-231-1/+0
|
* Re-implement: do not silently fail when a command is not carriedmtm2008-01-261-1/+1
| | | | | | | | | | | | | | | out because the rc.conf(5) variable was not enabled. Display a message that the command wasn't run and offer suggestions on what the user can do. Implement a quiet prefix, which will disable some diagnostics. The fast prefix also implies quiet. During boot we use either fast or quiet. For shutdown we already use 'faststop'. So, this informational message should only appear during interactive use. An additional benefit of having a quiet prefix is that we can start putting some of our diagnostic messages behind this knob and start "de-cluttering" the console during boot and shutdown.
* Add a dummy script, FILESYSTEMS, which depends on root and mountcritlocaldes2007-04-021-1/+1
| | | | | | | | | | | | and takes over mountcritlocal's role as the early / late divider. This makes it far easier to add rc scripts which need to run early, such as a startup script for zfs, which is right around the corner. This change should be a no-op; I have verified that the only change in rcorder's output is the insertion of FILESYSTEMS immediately after mountcritlocal. MFC after: 3 weeks
* Attempt to make running the new rc in a jail more automatic bydougb2006-02-201-1/+6
| | | | | | | resetting of early_late_divider to a more appropriate value if the admin has not modified the default. Reviewed by: brooks
* Remove rcconf.sh from /etc/rc.d, and instead load the configurationdougb2005-12-101-9/+11
| | | | | | | | | | | | | | | | as part of rc. Doing this, and the sourcing of rc.subr after we have determined if we are booting diskless (and correspondingly run rc.initdiskless if necessary) are safe, and actually allow fewer files to be needed on the diskless box. This also allows variables from the configuration to be available to rc itself, such as ... Add a variable to rc.conf, early_late_divider, which designates the script which separates the early and late stages of the boot process. Default this to mountcritlocal, and add text to etc/defaults/rc.conf, rc.conf(5) and diskless(8) which describes how and why one might want to change this. Reviewed by: brooks
* Introduce startup scripts from the local_startup directories todougb2005-12-021-1/+33
| | | | | | | | | | | | | | | | the base rcorder. This is accomplished by running rcorder twice, first to get all the disks mounted (through mountcritremote), then again to include the local_startup directories. This dramatically changes the behavior of rc.d/localpkg, as all "local" scripts that have the new rc.d semantics are now run in the base rcorder, so only scripts that have not been converted yet will run in rc.d/localpkg. Make a similar change in rc.shutdown, and add some functions in rc.subr to support these changes. Bump __FreeBSD_version to reflect this change.
* To allow /etc to be as minimal as possible in a diskless setup, we needbrooks2005-04-291-0/+5
| | | | | | | | | | | | | to run initdiskless before we run rcorder on /etc/rc.d. To allow this, move /etc/rc.d/initdiskless to /etc/rc.initdiskless and run it directly from /etc/rc. Remove /etc/rc.d/preseedrandom as it is no longer necessicary (we start with entropy unblocked) and was only used by initdiskless when it was needed. Discussed on: freebsd-rc Repocopy by: peter
* Remove an unused variable.mtm2004-10-081-1/+0
| | | | Submitted by: Pawel Worach <pawel.worach@telia.com>
* Remove the requirement for the FreeBSD keyword as it no longermtm2004-10-071-1/+1
| | | | | | | makes any sense. Discussed with: dougb, brooks MFC after: 3 days
* Correct typo.mtm2004-07-241-1/+1
| | | | Submitted by: eik (and probably many others)
* Restore pre-rcNG behaviour:mtm2004-06-061-2/+2
| | | | | | | SIGINT (Ctrl-c) kills the current script SIGQUIT (Ctrl-\) kills /etc/rc (dropping you into single-user) Prodded by: harti
* Fix skipping scripts with given keywords.pjd2004-03-081-3/+3
| | | | Proper syntax is '-s keyword1 -s keyword2', not '-s keyword1 keyword2'.
* o Add support for detecting a jailed environment. If a scriptmtm2004-02-271-2/+4
| | | | | | | | | cannot or does not want to be executed in a jail the KEYWORDS line should contain the nojail keyword. o Update Copyright # I suggest people who use jails more extensively than I do # make commits to the appropriate files.
* Per previous announcement, remove the old version of the rc system.dougb2003-05-021-960/+15
| | | | | | | | | | All functionality from the previous system has been preserved, and users should still customize their system boot with the familiar methods, rc.conf, rc.conf.local, rc.firewall, sysctl.conf, etc. Users who have customized versions of scripts that have been removed should take great care when upgrading, since the compatibility code that used those old scripts has also been removed.
* Add a dire warning about the impending demise of the old rc system.dougb2003-04-271-0/+9
| | | | Suggested by: scottl
* Set appropriate tag "fsck" to logger(1) for background fsck messages.matusita2003-04-231-1/+1
| | | | | PR: 51174 Submitted by: Alex Popa <razor@ldc.ro>
* Redo the initial rc_ng check to avoid rc.conf pollution occuring too early,dillon2002-12-231-14/+34
| | | | | | initdiskless may retarget /etc and various rc.conf files. The initial check is now done in a subshell. Reviewed by: Mike Makonnen <mtm@identd.net>
* Do not unconditionally load the configuration files for the RCNG case.dillon2002-12-221-11/+3
| | | | | | | | | | | | | | Instead, load them as part of the rc.d system. This allows us to prioritize the initidiskless script so it runs before the configuration files are loaded and allows us to get rid of the exit 2 hack in /etc/rc. The exit 2 never worked anyway since it did not unset the prior configuration, causing the diskless code to not operate properly. Do a major cleanup and revamping of the diskless code for RCNG. This will be backported to the non-RCNG scripts as well as -stable. With suggestions from: Mike Makonnen <mtm@identd.net> MFC after: 7 days
* Delay an optional amount of time after booting before starting amckusick2002-12-181-2/+8
| | | | | | | | | background fsck. The delay defaults to sixty seconds to allow large applications such as the X server to start before disk I/O bandwidth is monopolized by fsck. Submitted by: Brooks Davis <brooks@one-eyed-alien.net> Sponsored by: DARPA & NAI Labs.
* Update rc scripts to load mac_lomac instead of lomac.rwatson2002-11-261-1/+1
| | | | | | Approved by: re Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Aesthetics: Most (all?) other messages output at boot time havedd2002-10-121-1/+1
| | | | trailing periods, so why shouldn't this one?
* Fix all whitespace style bugs where spaces have been usedschweikh2002-10-031-15/+15
| | | | | | | where tabs should have been. Cut & paste disease? Spotted by: vi(1) tabstop=4 MFC after: 2 weeks
* In a diskless setup, rc.d/initdiskless may overwrite parts of /etc ondd2002-10-021-0/+7
| | | | | | | | | | | | a per-machine or per-cluster (with different ways of expressing what's part of a cluster) basis. In order for this to be effective, rc.conf has to be reread after initdiskless is finished. Implement this by adding a hook to etc/rc which rereads rc.conf by request. This can also be implemented by renaming initdiskless to initdiskless.sh and sourcing rc.conf there manually, but it was decided that, that would be uglier than a hook in etc/rc. Developed in concert with: gordon
* Initiate deorbit burn for the i386-only a.out related support. Moves arepeter2002-09-171-12/+8
| | | | | | | | | | | | | | | under way to move the remnants of the a.out toolchain to ports. As the comment in src/Makefile said, this stuff is deprecated and one should not expect this to remain beyond 4.0-REL. It has already lasted WAY beyond that. Notable exceptions: gcc - I have not touched the a.out generation stuff there. ldd/ldconfig - still have some code to interface with a.out rtld. old as/ld/etc - I have not removed these yet, pending their move to ports. some includes - necessary for ldd/ldconfig for now. Tested on: i386 (extensively), alpha
* Quiet warnings about non-existent scripts. My own fault for not testing mygordon2002-09-111-1/+1
| | | | own patches as well as I should.
* Remove an accidental double chkdepend that snuck in during the last commit.gordon2002-08-151-1/+0
| | | | Submitted by: Mike Makonnen <makonnen@pacbell.net>
* Don't export variables from /etc/rc when doing rc_ng because the scriptsgordon2002-08-141-2/+0
| | | | | | are sourced in a subshell. Submitted by: Mike Makonnen <makonnen@pacbell.net>
* Clean up some variables that should have been done before:gordon2002-08-141-4/+16
| | | | | | | | | | | 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>
* Add the final bits that allow the use of rc.d. Note that you can togglegordon2002-06-131-2/+53
| | | | | | | between rc.d and the classic boot scripts based on the rcng variable in your rc.conf. Defaults to classic boot scripts. Submitted by: Mike Makonnen
* Consistancy, file system > filesystemtrhodes2002-05-161-5/+5
|
* It is dangerous to use globbing like so in startup scripts:nectar2002-05-081-1/+3
| | | | | | | | | rm -f /tmp/.X11-unix/* If /tmp/.X11-unix didn't already exist, a user could symlink it to a directory with files that he wants to wipe out, and wait for next reboot. Reported by: lumpy <lumpy@the.whole.net>
* Rename the file used to specify the nextboot to make it clear that thiswes2002-04-261-1/+1
| | | | | | | is a loader configuration file and can be used for more than just a kernel name. Submitted by: Gordon Tetlow <gordont@gnf.org>
* Add a -k option to reboot to specify the kernel to boot next timewes2002-04-261-0/+4
| | | | | | | | | | | | | | | | around. If the kernel boots successfully, the record of this kernel is erased, it is intended to be a one-shot option for testing kernels. This could be improved by having the loader remove the record of the next kernel to boot, it is currently removed in /etc/rc immediately after disks are mounted r/w. I'd like to MFC this before the 4.6 freeze unless there is violent objection. Reviewed by: Several on IRC MFC after: 4 days
* Do not use 'ps -e' for entropy gathering. It uses /proc/*/mem to rummageobrien2002-04-231-1/+1
| | | | | | | around *user* memory to extract the environment variable strings. This is problematic for us. Submitted by: peter
* Quoting Peter Wemm, "At great personal risk, touch the sendmail startupgshapiro2002-04-051-38/+4
| | | | | | | | | | | | | | | | | | | | | again." As an alternative to sendmail_enable=NONE, solve the boot time problem for non-sendmail users completely by moving all of the sendmail startup code from /etc/rc to /etc/rc.sendmail. The source for that script will be kept in src/etc/sendmail/rc.sendmail so make.conf's NO_SENDMAIL will prevent it from being installed. A new rc.conf variable, mta_start_script specifies the script to run to start the user's preferred MTA. For backward compatibility, it will default to /etc/rc.sendmail. The specified script is called out of /etc/rc after checking to make sure it exists. A new rc.sendmail.8 man page has also been added which now houses the sendmail_* variable descriptions formerly in rc.conf.5. Use /etc/rc.sendmail in /etc/mail/Makefile to reduce code duplication. Reviewed by: -current, -stable, obrien, peter, ru MFC after: 1 week
* Provide a way for users to completely prevent sendmail from trying to startgshapiro2002-03-281-14/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | at boot time. Instead of rc.conf's sendmail_enable only accepting YES or NO, it can now also accept NONE. If set to NONE, none of the other sendmail related startup items will be done. Remove an extra queue running daemon might be started that wasn't necessary (it didn't hurt anything but it wasn't needed). The new logic is: # MTA if ${sendmail_enable} == NONE # Do nothing else if ${sendmail_enable} == YES start sendmail with ${sendmail_flags} else if ${sendmail_submit_enable} == YES start sendmail with ${sendmail_submit_flags} else if ${sendmail_outbound_enable} == YES start sendmail with ${sendmail_outbound_flags} endif # MSP Queue Runner if ${sendmail_enable} != NONE && [ -r /etc/mail/submit.cf] && ${sendmail_msp_queue_enable} == YES start sendmail with ${sendmail_msp_queue_flags} endif Discussed with: Thomas Quinot <Thomas.Quinot@Cuivre.FR.EU.ORG>, Christopher Schulte <schulte+freebsd@nospam.schulte.org> MFC after: 1 week
* Don't start any sendmail process in the back ground.obrien2002-03-261-3/+3
| | | | Requested by: gshapiro
* Don't background the sendmail-clientmqueue process -- can give:obrien2002-03-251-1/+1
| | | | sm-queue[181]: NOQUEUE: SYSERR(root): fill_fd: before readcf: fd 1 not open: Bad file descriptor
* Sendmail can be slow to startup.obrien2002-03-221-4/+4
| | | | So start it in the background to speed up booting.
* Make sure that rc.syctl gets its own version of positional parametersdougb2002-03-181-2/+2
| | | | Submitted by: cjc
* Distinguish between first and last passes of rc.sysctl, and only setdougb2002-03-171-3/+2
| | | | mibs whose values are not already what is specified in sysctl.conf.
* Add a late rc.sysctl pass to catch sysctl's for things that weredougb2002-03-171-1/+8
| | | | | | | not loaded yet on the first pass. PR: conf/19629 Submitted by: Stephen J. Roznowski <sjr@home.com>
* Only put standard FreeBSD directories in the PATH. If thecjc2002-03-161-1/+1
| | | | | | | | administrator wishes to run commands outside of the PATH, he should use a full pathname for the executable or set the PATH as appropriate in any local startup scripts. PR: misc/35770
* Allow LOMAC to be loaded as part of the boot scripts using "lomac_enable"rwatson2002-03-121-0/+7
| | | | | | | setting in rc.conf. Extracted from the still clammy hands of: green Sponsored by: DARPA, NAI Labs
* Run dumpon(8) early so crashes during startup can be caught. Incjc2002-03-121-14/+17
| | | | | | | | addition, take out the checks on the $dumpdev. dumpon(8) behaves well if given a non-existent filename. It gives a nice error message which is better rather than the current silent failure. Reviewed by: des
OpenPOWER on IntegriCloud