summaryrefslogtreecommitdiffstats
path: root/etc
Commit message (Collapse)AuthorAgeFilesLines
* Merge multi-FIB IPv6 support from projects/multi-fibv6/head/:bz2012-02-171-5/+21
| | | | | | | | | | | | Extend the so far IPv4-only support for multiple routing tables (FIBs) introduced in r178888 to IPv6 providing feature parity. This includes an extended rtalloc(9) KPI for IPv6, the necessary adjustments to the network stack, and user land support as in netstat. Sponsored by: Cisco Systems, Inc. Reviewed by: melifaro (basically) MFC after: 10 days
* Style: prefer the use of line continuations to +=eadler2012-02-171-42/+42
| | | | | | Requested by: marcel, dougb, bde Approved by: cperciva MFC after: 3 days
* Revert r231673 and r231682 for now, until we can run a full makedim2012-02-141-2/+0
| | | | | | universe with them. Sorry for the breakage. Pointy hat to: me and brooks
* Cleanup of xlocale:theraven2012-02-141-0/+2
| | | | | | | | | | | | | | | | - Address performance regressions encountered by das@ by caching per-thread data in TLS where available. - Add a __NO_TLS flag to cdefs.h to indicate where not available. - Reorganise the xlocale.h definitions into xlocale/*.h so that they can be included from multiple places. - Export the POSIX2008 subset of xlocale when POSIX2008 says it should be exported, independently of whether xlocale.h is included. - Fix the bug where programs using ctype functions always assumed ASCII unless recompiled. - Fix some style(9) violations. Reviewed by: brooks (mentor) Approved by: dim (mentor)
* Fix various issues with the NFS and RPC related scripts:dougb2012-02-1415-148/+68
| | | | | | | | | | | | | | | | | | | 1. Add new functionality to the force_depend method to incorporate the tests for whether the service is enabled and/or already running. 2. Add a new option to bypass checking only that the service is enabled at boot time, and always check if it is running. 3. Use this new functionality to greatly simplify the rc.d scripts that use force_depend. 4. Add a force_depend for statd in lockd 5. Remove the check that either nfs_server or nfs_client is _enable'd from statd and lockd. This was always overkill, and prevented using the {one|force}start options, as well as stop'ing on the command line. 6. The yp* scripts had some of their arguments in various weird orders. Bring them into line with the model. 7. If mountd fails to create /var/db/mountdtab, err out. Ideas, suggestions, and/or review from delphij and jilles. Pointy hats are completely my responsibility however.
* Re-generate /etc/devd/usb.confhselasky2012-02-131-6/+15
| | | | MFC after: 1 day
* start watchdogd before most of other daemons/serversavg2012-02-122-2/+2
| | | | | | | | | The main benefit is that watchdogd would shutdown after most of other daemons/servers and thus, for example, would remedy a system hang caused by unlucky X server shutdown. Reviewed by: dougb (earlier version) MFC after: 2 weeks
* Avoid using BEFORE in the utx rc script.ed2012-02-122-2/+1
| | | | Requested by: dougb
* Move utmpx handling out of init(8).ed2012-02-113-2/+23
| | | | | | | | | | | | | | | | | This has the following advantages: - During boot, the BOOT_TIME record is now written right after the file systems become writable, but before users are allowed to log in. This means that they can't cause `hidden logins' by logging in right before init(8) kicks in. - The pututxline(3) function may potentially block on file locking, though this is very rare to occur. By placing it in an rc script, the user can still kill it with ^C if needed. - Most importantly: jails don't use init(8). This means that a force reboot of a system running jails will leave stale entries in the accounting database of the jails individually.
* In the days before r208307 addswap was running early in the second stagedougb2012-02-112-2/+2
| | | | | | | | of rcorder. Somehow in the intervening period addswap got moved to the very end, which is almost certainly not what we want. This change moves it to right after kld so that for users who need it, they'll get it ASAP.
* Make etc/Makefile more conflict resistanteadler2012-02-091-12/+42
| | | | | | | PR: conf/163789 Submitted by: gcooper (iXsystems) Approved by: cperciva MFC after: 3 days
* Revert r211288 and move the logic to the acpi_timer itself.jkim2012-02-082-18/+0
|
* As it stands right now, the default devfs rulesets are only loaded as adougb2012-02-082-1/+3
| | | | | | | | | side effect of something else using them. If they haven't been loaded already but you want to use them, say for configuring a jail, you're out of luck. So add a knob to always load the default rulesets. While I'm here document the other devfs_ knobs in rc.conf.5.
* Add an option to 404.status-zfs (enabled by default) to list allgjb2012-02-082-4/+14
| | | | | | | | | | | | | zfs pools on the system. While here, document daily_status_zfs_enable in periodic.conf(5). Discussed on: -fs [1] Reviewed by: netchild [1] Approved by: jhb MFC after: 1 week [1] - http://lists.freebsd.org/pipermail/freebsd-fs/2011-June/011869.html
* Fix $ipv6_network_interfaces handling in rc.d/routing. It could fail whenhrs2012-02-041-2/+4
| | | | | | it was set to "auto", for example. MFC after: 3 days
* Perform IPv6 DAD only in ifn_start.hrs2012-01-291-2/+4
|
* Remove the notify match from a couple devd apple events, the events don'tjhibbits2012-01-281-2/+0
| | | | | | | include notify tags. Approved by: nwhitehorn (mentor) MFC after: 3 days
* Fix several glitches in IPv6-related knobs:hrs2012-01-222-6/+28
| | | | | | | | | | | | | | - ipv6_enable + ipv6_gateway_enable should unset ACCEPT_RTADV by default for backward compatibility. - Configurations in ipv6_prefix_IF should be recognized even if there is no ifconfig_IF_ipv6. - DAD wait should be performed at once, not on a per-interface basis, if possible. This fixes an issue that a system with a lot of IPv6-capable interfaces takes too long for booting. MFC after: 1 week
* When creating the jails /dev/log symlink, do it by full path to avoidbrooks2012-01-201-4/+1
| | | | | | | | | | creating stray "log" symlinks if the mount fails. That apparently happens in some ezjail configs. PR: conf/143084 Submitted by: Dirk Engling <erdgeist at erdgeist.org> Reviewed by: simon MFC after: 2 weeks
* /etc/netstart: remove invocation of dhclientrea2012-01-201-1/+0
| | | | | | | | dhclient is no longer a real service, it is a helper script for /etc/rc.d/netif and devd. Its direct invocation isn't needed to bring the network up. Approved by: jhb
* dhclient: don't use syslog for logging non-DHCP interface errorsrea2012-01-201-2/+2
| | | | | | We should show the error to user, but it doesn't deserve syslog. Approved by: jhb
* If we're booting there is no need to waste time determining if the servicedougb2012-01-201-1/+1
| | | | | | | is running or not. PR: conf/150752 Submitted by: YIN Xiaofeng <75394094@qq.com>
* Now that its callers have been udpated, remove set_rcvar().dougb2012-01-141-46/+5
| | | | | | The concept of set_rcvar() was nice in theory, but the forks it creates are a drag on the startup process, which is especially noticeable on slower systems, such as embedded ones.
* Prepare for the removal of set_rcvar() by changing the rcvar=dougb2012-01-1466-70/+70
| | | | | | | | | | | | | | | assignments to the literal values it would have returned. The concept of set_rcvar() was nice in theory, but the forks it creates are a drag on the startup process, which is especially noticeable on slower systems, such as embedded ones. During the discussion on freebsd-rc@ a preference was expressed for using ${name}_enable instead of the literal values. However the code portability concept doesn't really apply since there are so many other places where the literal name has to be searched for and replaced. Also, using the literal value is also a tiny bit faster than dereferencing the variables, and every little bit helps.
* rc.d: document 'quiet' prefix and fix dhclient/devd interactionrea2012-01-122-2/+9
| | | | | | | | | | | | | | | | | | | | | Document the current semantics of the 'quiet' command prefix in the rc.subr(8). Fix dhclient rc.d script: it should not call err() for non-DHCP-enabled interface when it is called from devd, because the latter just blindly calls 'service dhclient quietstart' on each "link up" event. Since the 'quietstart' will silence the message "Cannot 'start' <foo>. Set <foo>_enable to YES in /etc/rc.conf or use 'onestart' instead of 'start'." and running dhclient on the non-DHCP-enabled interface is the same thing as running the service <foo> without <foo>_enable set, such modification is in sync with the current semantics of the 'quiet' prefix. Approved by: glebius Reviewed by: freebsd-rc list MFC after: 2 weeks
* Bunch of fixes to pfsync(4) module load/unload:glebius2012-01-091-7/+0
| | | | | | | | | | | | | | | | | | | | | o Make the pfsync.ko actually usable. Before this change loading it didn't register protosw, so was a nop. However, a module /boot/kernel did confused users. o Rewrite the way we are joining multicast group: - Move multicast initialization/destruction to separate functions. - Don't allocate memory if we aren't going to join a multicast group. - Use modern API for joining/leaving multicast group. - Now the utterly wrong pfsync_ifdetach() isn't needed. o Move module initialization from SYSINIT(9) to moduledata_t method. o Refuse to unload module, unless asked forcibly. o Improve a bit some FreeBSD porting code: - Use separate malloc type. - Simplify swi sheduling. This change is probably wrong from VIMAGE viewpoint, however pfsync wasn't VIMAGE-correct before this change, too. Glanced at by: bz
* There is no longer a need to abstract ${rcvar_manpage} as we are notdougb2012-01-082-3/+2
| | | | attempting to maintain compatibility with NetBSD for some years now.
* Spelling fixes for etc/uqs2012-01-078-17/+17
|
* Add 'nojail' keyword as auditd(8) can't really do anything useful whenpjd2012-01-061-1/+1
| | | | | | | inside a jail. Discussed with: rwatson MFC after: 1 week
* - Put one file into one line. This makes keeping local changes and mergingpjd2011-12-151-39/+154
| | | | | | | | | with FreeBSD easier for vendors. - For optional files use variables starting with underscore. Both changes make rc.d/Makefile look similar to sys/modules/Makefile. Reviewed by: dim
* Add compatibility support for specifing IPv4 aliases inglebius2011-12-131-0/+7
| | | | | | rc.conf without the "inet" keyword. Obtained from: hrs
* Fix style(9) issues from r228270.jhibbits2011-12-051-1/+1
| | | | Approved by: nwhitehorn (mentor)
* Add a devd notification for closing/opening the lid on PowerBooks and iBooks.jhibbits2011-12-051-0/+10
| | | | Approved by: nwhitehorn (mentor)
* Ensure kldxref is run first. Currently both 'kldxref' and 'kld' dependobrien2011-12-011-1/+1
| | | | | | on "FILESYSTEMS" and 'kld' is being run 8 scripts ahead of 'kldxref'. Reported by: dhw
* Import libc++ / libcxxrt into base. Not build by default yet (usetheraven2011-11-251-0/+4
| | | | | | | | | | | MK_LIBCPLUSPLUS=yes to enable). This is a work-in-progress. It works for me, but is not guaranteed to work for anyone else and may eat your dog. To build C++ using libc++, add -stdlib=libc++ to your CXX and LD flags. Bug reports welcome, bug fixes even more welcome... Approved by: dim (mentor)
* Better use pkill(1) in last commit.glebius2011-11-211-1/+1
| | | | Submitted by: pjd
* On some laptops it is important to re-open /dev/psm after resume. moused(8)glebius2011-11-151-0/+4
| | | | | was capable to do this upon SIGHUP for more than a decade. Automate this via rc.resume in default installation.
* The default setting, daily_accounting_compress="NO", was causingdougb2011-11-131-6/+12
| | | | | | | | | | | | | | | only 1 old file to be saved, so fix this. Problem raised in the PR, but actually required a different solution. While I'm here, fix a very old off-by-one error causing 1 more file than specified in daily_accounting_save to be saved because acct.0 was not taken into account (pun intended). Change that, and use a more thorough method of finding old files to delete. Partly just because this is the right thing to do, but also to silently fix the extra log that would have been left behind forever with the previous method. PR: conf/160848 Submitted by: Andrey Zonov <andrey@zonov.org>
* rc.d: Eliminate some unnecessary non-POSIX constructs:jilles2011-11-083-2/+3
| | | | | | * set - ... * empty braces * ^ in character class
* Whenever you boot with nfsv4_server_enable=NO (the default) in rc.conf,dim2011-11-051-0/+5
| | | | | | | | | | | | | | | | | | | the /etc/rc.d/nfsd script sets vfs.nfsd.server_max_nfsvers to 3. Then, when you set nfsv4_server_enable=YES in rc.conf, and restart nfsd via the rc.d script, without rebooting, the sysctl does *not* get reset to max version 4, so NFSv4 still doesn't work. Fix this by explicitly setting vfs.nfsd.server_max_nfsvers to 4 when NFSv4 is requested. I also added resetting of the nfs_privport sysctls, since this has the same issue: nfs_reserved_port_only=YES in rc.conf sets the nfs_privport sysctl to 1, but in the other case, the sysctl doesn't get reset to 0. Reviewed by: rmacklem Silence from: rc@ MFC after: 3 days
* Fix handling of rc_force in /etc/rc.d/dhclientrea2011-10-281-4/+13
| | | | | | | | | | Variable 'rc_force' is accessible only at the time of rc_run_command, so it can't be examined from the script's main code. Spotted by: hrs Reviewed by: hrs, des Approved by: des MFC after: 2 weeks
* Increase default scrub threshold from 30 days to 5 weeks. Usingdelphij2011-10-272-3/+3
| | | | | | | whole weeks makes it easier to predicate when the scrub would happen. MFC after: 1 week
* Remove example for linking /dev/vga to /dev/ttyv0, this hasn't beengavin2011-10-271-3/+0
| | | | | | | | required since X version 4.3.0. PR: conf/161847 Submitted by: eadler MFC after: 2 weeks
* Update the example rules in devfs.conf to reflect the changes since ATA_CAM.gavin2011-10-271-1/+2
| | | | | | | While here, add another example rule, as many applications these days expect to find /dev/dvd instead. MFC after: 3 days
* - Add support for a "!" character in regex matching in devd(8). It invertshrs2011-10-261-0/+1
| | | | | | | | | the logic (true/false) of the matching. - Add "!usbus[0-9]+" to IFNET ATTACH notification handler in the default devd.conf to prevent rc.d/netif from running when usbus[0-9]+ is attached. Reviewed by: imp
* Correctly reassign copyright of etc/rc.d/static_ndp back to delphij@mm2011-10-231-1/+1
| | | | | | | as the project itself is no legal entity Reported by: Joe Dahl <joel@vnode.se> MFC after: 3 days
* Add etc/rc.d/static_ndp, analogous to etc/rc.d/static_arp.mm2011-10-234-1/+77
| | | | | | | | | | Make sure that static ARP and NDP bindings are set before NETWORKING. As static_ndp is based on static_arp, pass copyright to the project with permission of the original author (delphij@). Reviewed by: delphij@FreeBSD.org MFC after: 3 days
* Add support for removing addresses added by ipv6_prefix_hostid_addr_up()hrs2011-10-231-7/+10
| | | | upon rc.d/netif stop.
* Fix an issue that 127/8 is not configured when $ifconfig_DEFAULT is not empty.hrs2011-10-231-1/+1
| | | | Spotted by: ume
* Add new USB IDs to RUN driver. Update usb.conf.hselasky2011-10-191-7/+71
| | | | | PR: usb/161798 MFC after: 3 days
OpenPOWER on IntegriCloud