summaryrefslogtreecommitdiffstats
path: root/etc/rc.d
Commit message (Collapse)AuthorAgeFilesLines
* MFC 208060:dougb2010-05-1413-21/+21
| | | | Remove trailing white space. No functional changes.
* MFC 207346:dougb2010-05-081-4/+10
| | | | | | | Fix named-checkconf in the situation where named_chroot_autoupdate is NOT set, but named_chrootdir IS set. Remove required_files for named.conf, named-checkconf is enough.
* MFC r206427, r206706, r206771:rpaulo2010-04-202-0/+44
| | | | | ubthidhci rc.d script to switch an USB bluetooth dongle from HID to HCI mode.
* MFC r204076,r204077,r204083,r205279:pjd2010-04-182-1/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r204076: Please welcome HAST - Highly Avalable Storage. HAST allows to transparently store data on two physically separated machines connected over the TCP/IP network. HAST works in Primary-Secondary (Master-Backup, Master-Slave) configuration, which means that only one of the cluster nodes can be active at any given time. Only Primary node is able to handle I/O requests to HAST-managed devices. Currently HAST is limited to two cluster nodes in total. HAST operates on block level - it provides disk-like devices in /dev/hast/ directory for use by file systems and/or applications. Working on block level makes it transparent for file systems and applications. There in no difference between using HAST-provided device and raw disk, partition, etc. All of them are just regular GEOM providers in FreeBSD. For more information please consult hastd(8), hastctl(8) and hast.conf(5) manual pages, as well as http://wiki.FreeBSD.org/HAST. Sponsored by: FreeBSD Foundation Sponsored by: OMCnet Internet Service GmbH Sponsored by: TransIP BV r204077: Remove some lines left over by accident. r204083: Add missing KEYWORD line. Pointed out by: dougb r205279 sys: Simplify loops.
* MFC r200028, r201193, r201752, r201930, r202460, r200672, r206375:ume2010-04-073-50/+13
| | | | | Unify rc.firewall and rc.firewall6, and obsolete rc.firewall6 and rc.d/ip6fw.
* MFC r205121:jh2010-03-231-2/+2
| | | | | | | | Use an unique directory name instead of hardcoded /tmp/.diskless. A malicious user could create a file named /tmp/.diskless and cause the script to misbehave. PR: conf/141258
* MFC 204427: Add the shutdown KEYWORD.ume2010-03-021-1/+1
|
* MFC r203433:ume2010-02-272-1/+27
| | | | | | | | | Add rc.d script for the rtsold(8) daemon. The rtsol(8) handles just one RA then exit. So, the OtherConfig flag may not be handled well by rtsol(8) in the environment where there are multiple RA servers on the segment. In such case, rtsold(8) will be your friend.
* MFC: r203676emax2010-02-161-6/+26
| | | | | | | | | Introduce new rc.conf variable firewall_coscripts. It can be used to specify list of executables and/or rc scripts that should be executed after firewall starts/stops. Submitted by: Yuri Kurenkov <y dot kurenkov at init dot ru> Reviewed by: rhodes, rc@
* MFC r202130:delphij2010-02-131-0/+0
| | | | Set svn:executable to *.
* MFC r203200; Allow use of -6 option to "server" and "peer" in ntp.conf.ume2010-02-061-1/+3
|
* MFC r202880:kib2010-01-291-1/+1
| | | | Do not check for existence of symlink source for the link action.
* Merge r201440, r201445 from head:gavin2010-01-171-2/+2
| | | | | | | | | | | | | | Don't complain when we encounter the "cache" source, it's valid. Also fix the error message to include a line feed and not include a stray comma. Submitted by: Artis Caune artis.caune gmail.com While here, change "> /dev/stderr" for more usual ">&2" Submitted by: jilles PR: bin/121671 Approved by: ed (mentor, implicit)
* MFC r201367, r201370:dougb2010-01-151-20/+21
| | | | | Virtualize the location of "the configuration directory" instead of hard-coding it to be /etc/namedb
* MFC r200448:dougb2009-12-291-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the change to rc.subr in r198162 it's not necessary to specify command in the rc.d script if we have a corresponding ${name}_program entry, which we do for named. Rename named_precmd to named_prestart to make it more clear and match convention. Move the command_args definition related to -u up into _prestart(). It (and the associated $named_uid value) are only used there, and unlike required_* and pidfile don't need to be used until this stage. Fix a silly bug that would only have affected people who were using the new named_wait or named_auto_forward features, AND had set up an rndc.conf file instead of using the automatically generated rndc.key. For named_conf: Add "-c $named_conf" to command_args if it's not set to the default. If it is set to the default and we're using the base BIND it's not necessary. If we're using BIND from the ports the user is likely to have included it in _flags (due to long necessity for doing so) so don't duplicate that if it's set. Add $named_conf to required_files MFC r200563: The named process needs to have a "working directory" that it can write to. This is specified in "options { directory }" in named.conf. So, create /etc/namedb/working with appropriate permissions, and update the entry in named.conf to match. In addition to specifying the working directory, file and path names in named.conf can be specified relative to the directory listed. However, since that directory is now different from /etc/namedb (where the configuration, zone, rndc.*, and other files are located) further update named.conf to specify all file names with fully qualified paths. Also update the comment about file and path names so users know this should be done for all file/path names in the file. This change will eliminate the 'working directory is not writable' messages at boot time without sacrificing security. It will also allow for features in newer versions of BIND (9.7+) to work as designed.
* MFC revisions 196550 and 196552:delphij2009-12-082-1/+74
| | | | | | | | | | | | | | | | | | Add a new rc.d script, static_arp, which enables the administrator to statically bind IPv4 <-> MAC address at boot time. In order to use this, the administrator needs to configure the following rc.conf(5) variable: - static_arp_pairs: A list of names for static bind pairs, and, - a series of static_arp_(name): the arguments that is being passed to ``arp -S'' operation. Example: static_arp_pairs="gw" static_arp_gw="192.168.1.1 00:01:02:03:04:05" See the rc.conf(5) manual page for more details.
* MFC r197947:dougb2009-10-1614-23/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | In regards to the "Starting foo:" type messages at boot time, create and employ a more generic solution, and use it in the individual rc.d scripts that also have an $rc_quiet test: 1. Add check_startmsgs() to rc.subr. 2. In the rc.d scripts that use rc_quiet (and rc.subr) substitute variations of [ -z "$rc_quiet" ] with check_startmsgs 3. In savecore add a trailing '.' to the end of the message to make it more consistent with other scripts. 4. In newsyslog remove a : before the terminal '.' since we do not expect there to be anything printed out in between to make it more consistent. 5. In the following scripts change "quotes" to 'quotes' where no variables exist in the message: savecore pf newsyslog 6. [Does not apply in RELENG_8] 7. In the following scripts separate the "Starting foo:" from the terminal '.' to make them more consistent: moused hostname pf 8. In nfsclient move the message to its own line to avoid a style bug 9. In pf rc_quiet does not apply to the _stop method, so remove the test there. 10. In motd add 'quotes' around the terminal '.' for consistency Approved by: re (kib)
* MFC r196439:dougb2009-10-141-3/+3
| | | | | | | | | Fix the typo mentioned in the PR, and one additional. Fix caps while I'm here. PR: conf/138087 Submitted by: Chris Petrik <c.petrik.sosa@gmail.com> Approved by: re (kib)
* MFC 196436;dougb2009-08-261-12/+0
| | | | | | | | | | | | Move is_wired_interface() from rc.d/wpa_supplicant into network.subr, simplify it a bit, and make use of that method to determine if an interface is a candidate for IPv6 rtsol rather than listing all of the possible wireless interfaces that should _not_ get rtsol'ed. This change is only relevant for 8.0+ unless the "wlan mandatory" code gets ported back to RELENG_7. Approved by: re (kib)
* Currently there is a problem with fscking UFS file systems created onpjd2009-07-295-27/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | top of ZVOLs. The problem is that rc.d/fsck runs before rc.d/zfs. The latter makes ZVOLs to appear in /dev/. In such case rc.d/fsck cannot find devfs entry and aborts. We cannot simply move rc.d/zfs before rc.d/fsck, because we first want kern.hostid to be configured (by rc.d/hostid). If we won't wait (hostid will be 0) we can reuse disks which are in use by different systems (eg. in SAN/NAS environment). We also cannot move rc.d/hostid before rc.d/fsck, because rc.d/hostid on first system start stores generated kern.hostuuid in /etc/hostid file, so it needs root file system to be mounted read-write. The fix is to split rc.d/hostid so that rc.d/hostid (which will now run before rc.d/fsck) only generates hostid and sets up sysctls, but doesn't touch root file system and rc.d/hostid_save (which is run after rc.d/root) and only creates /etc/hostid file. With that in place, we can move ZVOL initialization to dedicated rc.d/zvol script which runs before rc.d/fsck. PR: conf/120194 Reported by: James Snow <snow@teardrop.org> Reviewed by: brooks Approved by: re (kib) MFC after: 2 weeks
* Reverse the effect of r193198 for pf and ipfw which will once againdougb2009-06-266-6/+6
| | | | | | | | | | | | | | | allow them to start after netif. There were too many problems reported with this change in the short period of time that it lived in HEAD, and we are too late in the release cycle to properly shake it out. IMO the issue of having the firewalls up before the network is still a valid concern, particularly for pf whose default state is wide open. However properly solving this issue is going to take some investment on the part of the people who actually use those tools. This is not a strict reversion of all the changes for r193198 since it also included some simplification of the BEFORE/REQUIRE logic which is still valid for ipfilter and ip6fw.
* rc.d/fsck: allow additional options for fsck_y_enable via fsck_y_flagsavg2009-06-101-2/+2
| | | | | | | | | | Primary intention is to allow to pass -C option to avoid (re-)checking clean filesystems when preening fails and fsck -y kicks in. Submitted by: marck Reviewed by: current@ Approved by: jhb (mentor) MFC after: 1 week
* Small cleanups to the jail script:ed2009-06-101-4/+3
| | | | | | | | | - Remove redundant debugging of consolelog. - Use `while :', instead of `while [ true ]'. This is done in other places as well. Submitted by: Jille Timmermans <jille quis cx> (not jilles) Reviewed by: jilles
* Add support for the experimental nfs subsystem to the scripts inrmacklem2009-06-025-11/+70
| | | | | | | | | | | | | | /etc/rc.d. They use the following new rc variables: nfsv4_server_enable - set to "YES" to run the experimental server nfsuserd_enable - set to "YES" to run nfsuserd for NFSv4 client and server nfsuserd_flags - command line flags for nfsuserd nfscbd_enable - set to "YES" to run the experimental nfs client's NFSv4 callback daemon nfscbd_flags - command line flags for nfscbd Reviewed by: dougb Approved by: kib (mentor)
* Make the pf and ipfw firewalls start before netif, just like ipfilterdougb2009-06-0110-11/+7
| | | | | already does. This eliminates a logical inconsistency, and a small window where the system is open after the network comes up.
* Substitute ypset for ypbind in REQUIRE lines. If you use ypset it has todougb2009-06-015-5/+5
| | | | | | | | happen right after ypbind, and before anything that uses NIS. The only change in rcorder accomplished by this patch is make that happen. PR: conf/117555 Submitted by: John Marshall <john@rwsrv05.mby.riverwillow.net.au>
* Small cleanup, add (spurious) quotation marks around the valuedougb2009-05-304-4/+4
| | | | for name= to make these scripts consistent with the rest.
* As previously advertised, remove this script prior to the 8.0 branch.dougb2009-05-302-19/+1
|
* Further idmapd garbage collection -- remove rc.d Makefile reference andrwatson2009-05-221-1/+1
| | | | | | default settings. Submitted by: Pawel Worach <pawel.worach at gmail.com>
* Remove the unmaintained University of Michigan NFSv4 client from 8.xrwatson2009-05-221-18/+0
| | | | | | | prior to 8.0-RELEASE. Rick Macklem's new and more feature-rich NFSv234 client and server are replacing it. Discussed with: rmacklem
* - do not create and mount new file systems on top of the old ones on everydanger2009-05-171-2/+4
| | | | | | | invocation of this script once we already have one (in case tmpmfs="YES"). Reviewed by: dougb
* 1. New feature; option to have the script loop until a specified hostnamedougb2009-05-161-1/+97
| | | | | | | | | | | | (localhost by default) can be successfully looked up. Off by default. 2. New feature: option to create a forwarder configuration file based on the contents of /etc/resolv.conf. This allows you to utilize a local resolver for better performance, less network traffic, custom zones, etc. while still relying on the benefits of your local network resolver. Off by default. 3. Add named-checkconf into the startup routine. This will prevent named from trying to start in a situation where it would not be possible to do so.
* Trim trailing whitespace from the end of a linedougb2009-05-161-1/+1
|
* Added (pre|post)(start|stop) jail hooks. These can be used to runru2009-04-281-2/+108
| | | | | | | | arbitrary commands (outside the jail) associated with said events, e.g. to bring up/down CARP interfaces representing services run in jails. Reviewed by: simon
* - Add ipfw_nat to the list of required modules if "firewall_nat_enable"emax2009-03-301-2/+12
| | | | | | | | | | is set and "natd_enable" is NOT set; - Accept and pass firewall type to the external firewall script. Submitted by: Yuri Kurenkov < y -dot- kurenkov -at- init -dot- ru > MFC after: 3 days No response from: freebsd-rc
* Backout previous commit due to PEBKACguido2009-03-111-1/+1
|
* When swap resides on a mirror and it is not stopped, the mirrorguido2009-03-101-1/+1
| | | | | is degraded upon the next reboot and will have to be rebuild. Thus call swapoff when rebooting (read: when stopping swap1)
* Rename the rc.conf(5) knob if_up_delay to defaultroute_delay to bettermtm2009-02-171-3/+3
| | | | reflect its purpose.
* Reword informational message by rc.d/defaultroute.mtm2009-02-111-1/+1
| | | | PR: conf/131458
* Named normally cannot be started chrooted inside a jail. Thus treatbz2009-02-071-5/+23
| | | | | | | | | | the jail case specifically. In case we find a proper pre-seeded devfs in the chroot path (mounted from the base system) permit starting chrooted else give proper warn/error messages. PR: conf/103489 Reviewed by: dougb MFC after: 5 days
* The 30 second wait for network interfaces to show up effectively makes themtm2009-02-021-4/+15
| | | | | | time to boot an unplugged system 30 sec. longer for no good reason. Therefore, add a check to make sure that any DHCP interfaces are plugged in before waiting.
* Spawn one fewer shells on startup. We don't use dhcp_interfaces atimp2009-01-301-1/+0
| | | | | | all in this function, and grep shows no other instances of it (besides, this is a function, and in a sub-shell, so all changes are local).
* Backout change 187782. It inhibits ntpd from starting at allkeramida2009-01-291-1/+1
| | | | | | when ntpd_sync_on_start is set. Noticed by: rafan
* When synchronizing the clock at system startup time, use bothkeramida2009-01-271-1/+1
| | | | | | | | | the -g and -q options. They do a slightly different thing and both are necessary when the time difference is large. Noticed by: danger, in the forums Approved by: roberto MFC after: 1 week
* Update jail startup script for multi-IPv4/v6/no-IP jails.bz2009-01-261-16/+208
| | | | | | | | | | | | | | | | | | | | | | | Note: this is only really necessary because of the ifconfig logic to add/remove the jail IPs upon start/stop. Consensus among simon and I is that the logic should really be factored out from the startup script and put into a proper management solution. - We now support starting of no-IP jails. - Remove the global jail_<jname>_netmask option as it is only helpful to set netmasks/prefixes for the right address family and per address. - Implement jail_<jname>_ip options to support both address familes with regard to ifconfig logic. - Implement _multi<n> support suffix to the jail_<jname>_ip option to configure additional addresses to avoid overlong, unreadbale jail_<jname>_ip lines with lots of addresses. Submitted by: initial work from Ruben van Staveren Discussed on: freebsd-jail in Nov 2008. Reviewed by: simon, ru (partial, older version) MFC after: 1 week
* Correct a bug where /etc/rc.d/defaultroute fails to finish by printing abrooks2008-12-171-1/+3
| | | | | | | | | newline when it fails to obtain an address via DHCP. This made the next rc script begin its output on the same line. PR: conf Submitted by: Bruce Cran <bruce at cran dot org dot uk> MFC after: 3 days
* Implement support for RPCSEC_GSS authentication to both the NFS clientdfr2008-11-033-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and server. This replaces the RPC implementation of the NFS client and server with the newer RPC implementation originally developed (actually ported from the userland sunrpc code) to support the NFS Lock Manager. I have tested this code extensively and I believe it is stable and that performance is at least equal to the legacy RPC implementation. The NFS code currently contains support for both the new RPC implementation and the older legacy implementation inherited from the original NFS codebase. The default is to use the new implementation - add the NFS_LEGACYRPC option to fall back to the old code. When I merge this support back to RELENG_7, I will probably change this so that users have to 'opt in' to get the new code. To use RPCSEC_GSS on either client or server, you must build a kernel which includes the KGSSAPI option and the crypto device. On the userland side, you must build at least a new libc, mountd, mount_nfs and gssd. You must install new versions of /etc/rc.d/gssd and /etc/rc.d/nfsd and add 'gssd_enable=YES' to /etc/rc.conf. As long as gssd is running, you should be able to mount an NFS filesystem from a server that requires RPCSEC_GSS authentication. The mount itself can happen without any kerberos credentials but all access to the filesystem will be denied unless the accessing user has a valid ticket file in the standard place (/tmp/krb5cc_<uid>). There is currently no support for situations where the ticket file is in a different place, such as when the user logged in via SSH and has delegated credentials from that login. This restriction is also present in Solaris and Linux. In theory, we could improve this in future, possibly using Brooks Davis' implementation of variant symlinks. Supporting RPCSEC_GSS on a server is nearly as simple. You must create service creds for the server in the form 'nfs/<fqdn>@<REALM>' and install them in /etc/krb5.keytab. The standard heimdal utility ktutil makes this fairly easy. After the service creds have been created, you can add a '-sec=krb5' option to /etc/exports and restart both mountd and nfsd. The only other difference an administrator should notice is that nfsd doesn't fork to create service threads any more. In normal operation, there will be two nfsd processes, one in userland waiting for TCP connections and one in the kernel handling requests. The latter process will create as many kthreads as required - these should be visible via 'top -H'. The code has some support for varying the number of service threads according to load but initially at least, nfsd uses a fixed number of threads according to the value supplied to its '-n' option. Sponsored by: Isilon Systems MFC after: 1 month
* ifconfig(8) can take only one interface at a time.pjd2008-10-301-1/+3
|
* Allow a jail's IP alias to be created with an arbitrary netmask.ru2008-09-241-1/+3
| | | | MFC after: 3 days
* Allow a jail to be started with a specific route fib.thompsa2008-09-161-1/+8
| | | | | Reviewed by: secteam (simon) Reviewed by: brooks, bz
OpenPOWER on IntegriCloud