summaryrefslogtreecommitdiffstats
path: root/etc/rc.d
Commit message (Collapse)AuthorAgeFilesLines
* 1. Add missing semicolon between "warn" and "return" to make surerse2005-12-301-3/+3
| | | | | | | | | the line continuation backslash doesn't cause "warn" to print "return". 2. Group "warn" and "return" together as the "return 1" should be performed only if the "kldload nfsclient" also failed (and not already if the "vfs.nfs" sysctl(8) check failed). MFC after: 3 days
* Remove superfluous line continuation backslash.rse2005-12-301-1/+1
| | | | MFC after: 3 days
* Fix another braino, don't remove the X related socket directoriesdougb2005-12-271-2/+5
| | | | | | right after creating them. Twiddle whitespace while I'm here.
* Make sure that the prestart routine is run with *start, instead ofdougb2005-12-271-1/+1
| | | | | | just 'start'. Reminded by: keramida
* syslogd should REQUIRE newsyslog, rather than newsyslog usingdougb2005-12-212-2/+1
| | | | | BEFORE: syslogd. This does not produce any change in the ordering at the moment, but is cleaner style for the long term.
* Several users have commented (via filing PRs) that having ntp* dependdougb2005-12-212-4/+1
| | | | | | | | | | on devfs is useful so that a hardware time device can start with its necessary device nodes already in place. While this ordering happens as a side effect currently in HEAD, and the PRs were generally fixed via upgrades, etc; it's better to make it explicit. While I'm here, ntpd should REQUIRE ntpdate, rather than ntpdate using BEFORE: ntpd.
* REQUIRE: syslogd and BEFORE: NETWORKING are now antithetical,dougb2005-12-211-1/+0
| | | | | | | | | | | and including both in this file had nasty side effects on the ordering of syslogd, as well as producing an error when running rcorder. Remove the more bogus of the two options, which restores proper ordering and removes the error. There is an open question as to whether scripts with the nostart KEYWORD should even have REQUIRE/BEFORE lines, and indeed, whether they should be in /etc/rc.d at all, but that's for another time.
* Include a somewhat hackish way to make sure that we *always* test thedougb2005-12-201-1/+6
| | | | new clear_tmp_X variable when start'ing.
* Brooks pointed out a potential problem with disabling the X cleaningdougb2005-12-201-10/+17
| | | | | | | | by default, so add a new knob that is on by default, and check that knob in start_precmd so that it can run even if cleaning /tmp is not enabled. This has the advantage of not violating POLA, while still allowing the user to disable this behavior if they wish (for example on a server that will never run X).
* Clear up problems with /etc/rc.d/{abi|cleanvar|cleartmp} broughtdougb2005-12-193-47/+67
| | | | | | | | | | | | | | | | | to light by the PR. Specifically, convert these three scripts into good rc.d citizens, making sure that their functionality is preserved, but the rc.d framework rules are not broken. Add support for cleanvar as a regular rc.d script in the default rc.conf, and document this in the man page. Add a descriptive comment to rc.conf that regarding the three emulation/compatibility services provided by abi so users will not be confused by these services not having their own startup scripts. PR: conf/84574 Submitted by: Alexander Botero-Lowry
* Remove usbd(8) and all references to it. It is no longer necessaryiedowse2005-12-153-20/+2
| | | | | | since devd(8) now provides the same functionality. Submitted by: Anish Mistry
* Drop rcconf.sh now that it has been removeddougb2005-12-101-1/+1
|
* Remove rcconf.sh from /etc/rc.d, and instead load the configurationdougb2005-12-105-16/+1
| | | | | | | | | | | | | | | | 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
* Use of REQUIRE is better than BEFORE for most scripts, and verydougb2005-12-101-1/+1
| | | | few scripts should have no REQUIRE at all.
* Don't bogusly depend on dhclient. It's now run either bybrooks2005-12-031-1/+1
| | | | /etc/rc.d/netif or from devd rather than by the startup scripts.
* "-o rw" is invalid and undocumented mount option thatru2005-12-021-1/+1
| | | | | | | | | | | | | | | | | is only present for fstab(5) compatibility, and is otherwise ignored by mount(8) (not passed to mount_* programs, and not passed to nmount(2)). "-u -o rw" worked with an old mount(8) with mount_ufs.c because "-o rw" was stripped and simple "-u" caused an update of UFS from read-only to read-write, due to inability of mount(2) to track changes in options (MNT_RDONLY is either set or not). "-u" no longer causes the transition from RO to RW, now that mount(8) was converted to use nmount(2), so an explicit change to RW is required. Keep up with this change, and use "-uw" to mount root read-write.
* Brooks pointed out a case where tmp needs to be run afterdougb2005-12-021-2/+1
| | | | mountcritremote, so force it the other way instead.
* Introduce startup scripts from the local_startup directories todougb2005-12-021-32/+5
| | | | | | | | | | | | | | | | 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.
* Force this script to run before mountcritremote to avoiddougb2005-12-021-0/+1
| | | | | non-deterministic behavior when introducing local_startup scripts to rcorder.
* Remove not needed redirection of kldstat -q output to /dev/null.emax2005-11-222-2/+2
| | | | | Noticed by: pjd MFC after: 3 days
* Revise hcsecd(8) and sdpd(8) rc.d scripts one more timeemax2005-11-222-10/+26
| | | | | | | | | | - Use _prestart rc.d method to automatically kldload ng_btsocket(4) if needed; - Rename "sdpd_user" to "sdpd_username" and "sdpd_group" to "sdpd_groupname" to avoid collision with "magic" variables; Inspired by: yar MFC after: 3 days
* Revise hcsecd(8) and sdpd(8) rc.d scripts.emax2005-11-152-6/+22
| | | | | | | | | | - Have both scripts automatically kldload ng_btsocket(4). I did not want to do it, but its easier for users and it seems other scripts do similar things; - Assign few variables after load_rc_config, so the /etc/rc.conf overrides actually work; MFC after: 1 week
* Add a new configuration variable, ipv4_addrs_<ifn>, which adds one orbrooks2005-11-141-2/+2
| | | | | | | | | | | more IPv4 address from a ranged list in CIRD notation: ipv4_addrs_ed0="192.168.0.1/24 192.168.1.1-5/28" In the process move alias processing into new ipv4_up/down functions to more toward a less IPv4 centric world. Submitted by: Philipp Wuensche <cryx dash freebsd at h3q dot com>
* Start integrating Bluetooth into rc.d system.emax2005-11-102-1/+367
| | | | | | | | | | | | | | | | | | | | | | | | | Introduce /etc/rc.d/bluetooth script to start/stop Bluetooth devices. It will be called from devd(8) in response to device arrival/departure events. It is also possible to call it by hand to start/stop particular device without unplugging it. Introduce generic way to set configuration parameters for Bluetooth devices. By default /etc/rc.d/bluetooth script has hardwired defaults compatible with old rc.bluetooth from /usr/share/netgraph/bluetooth/examples. These can be overridden using /etc/defaults/bluetooth.device.conf file (system wide defaults). Finally, there could be another device specific override file located in /etc/bluetooth/$device.conf (where $device is ubt0, btccc0 etc.) The list of configuration parameters and their meaning described in the /etc/defaults/bluetooth.device.conf file. Even though Bluetooth device configuration files are not shell scripts, they must follow basic sh(1) syntax. The bluetooth.device.conf(5) and handbook update will follow shortly. Inspired by: Panagiotis Astithas ( past at ebs dot gr ) Reviewed by: brooks, yar MFC after: 1 week
* Backout r1.11...rse2005-11-101-1/+1
| | | | | | | | | | | | | | | | | | > > There is no need to explicitly add "status" to $extra_commands in > > the /etc/rc.d/pf script as it is implicitly added by /etc/rc.subr's > > run_rc_command() because of the existing $pf_program. > > > > Submitted by: Christoph Schug <chris@schug.net> ...because as yar@ points out: "[...] you were relying on evil side-effects of the variable being named *_program. hose side-effect have been eliminated since rc.subr rev. 1.42. [...] The point is that the default "status" method is for rc.d scripts that handle startup and shutdown of conventional daemons, and not for custom tasks like the pf case." The change is still valid in RELENG_6 (and still doesn't have to be backed out) as long as rc.subr:r1.42 is not MFC'ed to RELENG_6, too.
* There is no need to explicitly add "status" to $extra_commands inrse2005-11-031-1/+1
| | | | | | | | the /etc/rc.d/pf script as it is implicitly added by /etc/rc.subr's run_rc_command() because of the existing $pf_program. Submitted by: Christoph Schug <chris@schug.net> MFC after: 1 week
* Transforming "ppp-user" into just "ppp", step 5:yar2005-10-291-49/+0
| | | | Finally, delete the old, unfittingly named file "ppp-user".
* Transforming "ppp-user" into just "ppp", step 3:yar2005-10-291-1/+1
| | | | Install "ppp" (just repocopied) instead of "ppp-user".
* Use ${name} in pathnames where appropriate.yar2005-10-285-7/+7
| | | | | The sendmail script already was on this way, but it didn't reach the end of it yet.
* Use:yar2005-10-282-2/+2
| | | | | | | | command="/path/to/${name}" since it's applicable here. It's the current style of rc.d. Pointed out by: pjd
* Transforming "ppp-user" into just "ppp", step 1:yar2005-10-285-5/+5
| | | | | | | | | | | The rcorder(8) condition PROVIDE'd by the script and REQUIRE'd by the others becomes "ppp". The ultimate goal of the transformation is to reduce confusion resulting from the fact that $name has been "ppp" already. Discussed with: pjd, -rc
* Don't be lazy, set the "command" variable even ifyar2005-10-235-0/+5
| | | | | | | | | | /etc/defaults/rc.conf will provide foo_program, too. By specifying "command" we explicitly say that we're going to rely on rc.subr(8) default methods, and rc.subr(8) will take advantage of this soon. The majority of our rc.d scripts already set "command" if appropriate, so fix just the non-compliant handful.
* wpa_supplicant(8) requires -D option for ndis(4) now.jkim2005-10-191-1/+10
|
* First start rc.d/ipsec and then rc.d/mountcritremote, so we can mountpjd2005-10-122-2/+2
| | | | | | NFS file system over IPsec. Suggested by: Tomasz PiĀ³at <tomasz.pilat@axelspringer.pl>
* setkey(8) was repo-copied from usr.sbin/ to sbin/.pjd2005-10-121-1/+1
| | | | | | This will allow for NFS mount of /usr over IPsec. Discussed on: arch@
* Connect rc.d scripts for the hcsecd(8) and sdpd(8) daemons to the build.emax2005-10-121-1/+2
| | | | MFC after: 1 month
* Add rc.d scripts for the hcsecd(8) and sdpd(8) daemons. Put defaults intoemax2005-10-112-0/+44
| | | | | | | | | /etc/defaults/rc.conf. Both daemons can run even if no Bluetooth devices are attached to the system. Both daemons depend on Bluetooth socket layer and thus disabled by default. Bluetooth sockets layer must be either loaded as a module or compiled into kernel before the daemons can run. MFC after: 1 month
* Use available rc.subr features.yar2005-10-021-27/+16
| | | | | Reduce code duplication. Follow the current style of rc.d scripting.
* Record dependency on the newly introduced pfsync.yar2005-10-021-2/+2
| | | | | | | | | | | | | | Start before routing for better system protection. (pf used to start late during system boot, after many a network daemon have started already, which sucked from security POV.) Remark: For maximum security, pf should start before netif, but it would create a dependency loop because pfsync has to start after netif, yet before pf. Discussed with: mlaier on -pf MFC after: 5 days
* Add an rc.d script to start pfsync at the right moment of theyar2005-10-022-1/+54
| | | | | | | | | | | | | system boot, and hook it up in the system. The separate script is needed because in the presence of various interface lists in rc.conf ($network_interfaces, $cloned_interfaces, $sppp_interfaces, $gif_interfaces, more to come) it is hard to start them orderly, so that pfsync is brought up after its syncdev, which is required for the proper startup of pfsync. Discussed with: mlaier on -pf MFC after: 5 days
* Use rc.subr(8) appropriately:yar2005-10-021-44/+23
| | | | | | | | - utilize default methods instead of rolling local ones; - avoid to specify BEFORE conditions we don't really need (pflog will be REQUIRE'd by pf); - omit extra decoration from warning messages, warn() will decorate them sufficiently.
* o Remove unfinished code and make it possible to overridemaxim2005-10-021-14/+5
| | | | | | bsdextended_script from rc.conf(5): Not objected by: trhodes
* Use hw.machine_arch instead of hw.machine.nyan2005-09-301-1/+1
|
* Make it a good-mannered rcNG script respectful to the command line.yar2005-09-281-16/+23
|
* Don't print anything if we can't do any localpkg shutdown (start alreadybrooks2005-09-271-2/+1
| | | | | | | does this). Submitted by: Andre Albsmeier <Andre dot Albsmeier at siemens dot com> PR: conf/86606
* Simplify the code by making use of 'kldstat -q -m <mod>'.pjd2005-09-242-7/+4
| | | | No objections from: mlaier
* Simplify the code a bit by using newly added (to kldstat(8) '-q') option.pjd2005-09-231-4/+1
|
* If we're not installing OpenSSH in the base, don't install its startupwollman2005-09-231-1/+6
| | | | | file either. This clears the way for third-party SSH ports to install an RCng startup script.
* Add a new rc.conf entry, kerberos5_server_flags, which allows therwatson2005-09-201-1/+1
| | | | | | | administrator to specify additional start-up flags to the Kerberos 5 Authentication Server. MFC after: 3 days
* In mountd_precmd(), use rc_args, not mountd_args torodrigc2005-09-181-2/+2
| | | | | | | | | | override the value of mountd_args. This fixes the problem where mountd_args was not properly being set if weak_mountd_authentifcation="YES" was set in rc.conf. PR: conf/86260 Submitted by: Thierry Herbelot <thierry at herbelot dot com> MFC after: 3 days
OpenPOWER on IntegriCloud