Commit graph

5737 commits

Author SHA1 Message Date
Chris Rees c45506efd1 Clean up swapfile memory disk on shutdown
Make the md unit number configurable so that it can be predicted

PR:		bin/168544
Submitted by:	wblock (based on)
Approved by:	kevlo
2013-06-12 16:44:17 +00:00
Rui Paulo f3259b1bd2 Regen. 2013-06-10 05:45:53 +00:00
Hiroki Sato ed45ea12ca Add :ifname modifier to specify interface-specific routes into
{,ipv6_}static_routes and rc.d/routing.  For example:

 static_routes="foo bar:em0"
 route_foo="-net 10.0.0.0/24 -gateway 192.168.2.1"
 route_bar="-net 192.168.1.0/24 -gateway 192.168.0.2"

At boot time, all of the static routes are installed as before.
The differences are:

- "/etc/rc.d/netif start/stop <if>" now configures static routes
  with :<if> if any.
- "/etc/rc.d/routing start/stop <af> <if>" works as well.  <af> cannot be
  omitted when <if> is specified, but a keyword "any" or "all" can be used
  for <af> and <if>.
2013-06-09 18:11:36 +00:00
Ed Maste 42f8c5b580 Add a new knob WITH_DEBUG_FILES to control the building of standalone
debug files for userland programs and libraries.  The "-g" debug flag
is automatically applied when WITH_DEBUG_FILES is set.

The debug files are now named ${prog}.debug and ${shlib}.debug for
consistency with other systems and documentation.  In addition they are
installed under /usr/lib/debug, to simplify the process of installing
them if needed after a crash.  Users of bsd.{prog,lib}.mk outside of the
base system place the standalone debug files in a .debug subdirectory.
GDB automatically searches both of these directories for standalone
debug files.

Thanks to everyone who contributed changes, review, and testing during
development.
2013-06-07 21:40:02 +00:00
Jamie Gritton 761d2bb5b9 Refine the "nojail" rc keyword, adding "nojailvnet" for files that don't
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
2013-05-19 04:10:34 +00:00
Alan Somers 44e8231cc7 etc/rc.d/syslogd
Add netif as a requirement of syslogd to get lo0 up.  Currently, this
	doesn't affect the rc order, because mountcritremote already depends on
	netif.

Reviewed by:	eadler
Approved by:	kenm (mentor)
MFC after:	2 weeks
2013-05-13 20:28:24 +00:00
Eitan Adler fc0f2bcf18 Revert r250565 which causes issues for older CPUs
PR:		conf/178504
Requested by:	many
2013-05-12 21:24:18 +00:00
Eitan Adler e4132b573c Make newsyslog compress logs with xz instead of bzip2 to save space.
PR:		conf/178504
Submitted by:	ak
Reviewed by:	smh
2013-05-12 15:23:59 +00:00
Eitan Adler 2b3b363780 Unconditionally install 210.backup-aliases as many MTAs other than
sendmail support the use of /etc/aliases.

PR:		conf/176098
Submitted by:	ak
MFC after:	2 weeks
2013-05-11 23:55:43 +00:00
Eitan Adler ba7eea3304 Bring /etc/protocols up to date.
PR:	conf/175397
Submitted by:	ak
2013-05-10 13:57:44 +00:00
Hiroki Sato 6886522d85 - Fix exit status when ip6addrctl_verbose=yes [*]
- Use the absolute pathname for ip6addrctl.
- Use "install" instead of "add" to reduce the number of invocations.

Reported by:	Tatsuki Makino [*]
PR:		conf/175006 [*]
MFC after:	1 week
2013-05-04 15:42:55 +00:00
Chris Rees b48b774f99 Introduce and use new flag -L to mount for mounting only late filesystems.
Previously, rc.d/mountlate mounted *all* filesystems, causing problems with
background NFS mounts being mounted twice.

PR:		conf/137629
Submitted by:	eadler (original concept)
Reviewed by:	mjg
Approved by:	hrs
2013-05-04 14:00:16 +00:00
Brooks Davis 8dccfa7cab Make an attempt to detect missing MTREE files in distrib-dirs. Not
perfect, but this is just a developer seatbelt.

PR:		conf/176897
Submitted by:	Garrett Cooper <yaneurabeya@gmail.com>
MFC after:	1 week
2013-04-30 19:26:44 +00:00
Gregory Neil Shapiro 67cdc89155 Minor changes to force commit these files so new freebsd*.cf files are
built to use the new sendmail-8.14.6/cf tree.

MFC after:	4 days
2013-04-21 17:11:45 +00:00
Bryan Drewery d0f41f0f27 Also call configtest before reload to ensure working config.
Approved by:	jhb
MFC after:	1 week
X-MFC-With:	r249489
2013-04-16 17:30:13 +00:00
Bryan Drewery 35bee62512 Run configtest before restarting so that the system is not
left without a running sshd.

Approved by:	des
MFC after:	1 week
2013-04-14 21:11:19 +00:00
Dimitry Andric 139f7f9bf5 Upgrade our copy of llvm/clang to trunk r178860, in preparation of the
upcoming 3.3 release (branching and freezing expected in a few weeks).

Preliminary release notes can be found at the usual location:
<http://llvm.org/docs/ReleaseNotes.html>

An MFC is planned once the actual 3.3 release is finished.
2013-04-12 17:57:40 +00:00
Hans Petter Selasky f93344388e Regenerate usb.conf
MFC after:	1 week
2013-04-06 17:25:17 +00:00
Alexander Motin 401f21aece Remove periodic script for ataraid(4) and add instead script for graid(8). 2013-04-04 15:03:12 +00:00
Ed Maste 4f2dc3d723 Format per etc/mtree/README
- Spaces instead of tabs
- Sort some i18n entries
2013-04-01 17:15:04 +00:00
Andriy Gapon 3ee030e1e9 rc.subr: disabling globbing while processing devfs rules
The rules themselves typically have shell-like patterns and it is
incorrect when they get replaced with matching filesystem entries.

Shell magic by:	jilles
MFC after:	2 weeks
2013-03-28 08:13:52 +00:00
Jilles Tjoelker 7f16286cd1 rc.d/sysctl: Fix error messages about unknown OIDs.
There are three situations where the sysctl script is called:
1. "start", very early
2. "lastload", near the end of rc
3. "reload", at admin request while the system is booted

Ignore unknown OIDs in situation 1 because kernel modules may not be loaded
yet and complain about them in situations 2 and 3.

PR:		conf/174595
Submitted by:	Olivier Smedts
2013-03-22 20:12:25 +00:00
Colin Percival 953bb3854c Fix typo in previous commit: Exit if */dev/dumpdev* does not exist, not if
*/bin/realpath* does not exist...

Submitted by:	markj
Pointy hat to:	cperciva
2013-03-19 05:08:25 +00:00
Colin Percival 510a7a8624 If dumpdev is AUTO but no dump device has been set -- i.e., there is no swap
space configured for rc.d/dumpon to designate for dumping -- then exit
silently rather than with a
> realpath: /dev/dumpdev: No such file or directory
error message.

An argument could be made that we should print a (more informative) warning
message; but given that under the same conditions the rc.d/dumpon script will
already print a
> No suitable dump device was found
warning, it seems that printing an additional
> Dump device does not exist.  Savecore not run.
warning would be superfluous.
2013-03-19 04:42:04 +00:00
Neel Natu 4e34ce3e13 Add bhyve to examples.
Requested by: alfred, julian
Obtained from:	NetApp
2013-03-18 23:46:14 +00:00
Antoine Brodin 95a108e887 Finish portalfs removal. 2013-03-10 17:33:41 +00:00
Colin Percival 7f33ac6697 Now that stable/7 is EOL, stop building INDEX-7.
MFC after:	1 week
2013-03-07 20:48:36 +00:00
Jens Schweikhardt 5e1a43a84f Comment cosmetics: capitalize SCSI
Fix some hard tabs in the wrong place.

MFC after:	2 weeks
2013-03-02 18:08:03 +00:00
Dag-Erling Smørgrav 55de4cd6fe If rtadvd_interfaces is set to "none", start rtadvd without listing
any interfaces on the command line.

MFC after:	1 week
2013-02-25 17:07:42 +00:00
Andrey A. Chernov 69b23515b5 Back out prev. change preventing /sys/sys symlink. It appears my install
was not very recent and not acts like 'ln -h'
2013-02-22 19:57:18 +00:00
Andrey A. Chernov 312c5e1aeb In 'make hierarchy' don't install /sys/sys pointing to usr/src/sys
but just /sys pointing there
2013-02-17 13:06:59 +00:00
Jung-uk Kim 835ef82e3b Revert r227528 and r227787. This hack is no longer necessary since r233580. 2013-02-15 22:58:44 +00:00
John Baldwin 0895e9c70c Install <dev/agp/agpreg.h> and <dev/pci/pcireg.h> as userland headers
in /usr/include.

MFC after:	2 weeks
2013-02-05 18:55:09 +00:00
Dag-Erling Smørgrav 2a31bde3cd Load the pfsync module if necessary.
Reviewed by:	glebius@
MFC after:	1 week
2013-02-05 12:18:39 +00:00
Hajimu UMEMOTO e695500d3c Use the default policy table of RFC 6724.
MFC after:	1 weeks
2013-02-02 18:08:09 +00:00
Brooks Davis 8caedc2a57 When adding the directory ownership to the METALOG do it by name rather
than number as is done in install so as to differ binding of names to
ids.

Remove the -W flag from the mtree command so that the correct user and
group is recorded rather than the default.
2013-01-30 17:39:43 +00:00
Brooks Davis 64dc091fdd Log the addition of login.conf.db, passwd, pwd.db, and spwd.db via cat -l.
Make cat a bootstrap tool to facilitate this.
2013-01-29 22:17:58 +00:00
Neel Natu 0de8cf6314 Increase the "memorylocked" limit for the "daemon" class.
amd(8) requires more than the 64MB that is currently available to it so bump
it up to 128MB.

Reviewed by:	kib
Discussed with:	avg, kib, zont
2013-01-27 21:55:01 +00:00
Brooks Davis 4a63ae1150 Introduce a new option -DNO_ROOT that allows install and distribution
targets to be run without root privilege.

Information about ownership, group, flags, and suid bits are stored in
the file specified by METALOG which defaults to ${DESTDIR}/METALOG.
This file can be used in conjunction with bsdtar or makefs to generate
archives or file system images with correct permissions.

The packageworld target has been altered to use this metadata allowing
non-root releases (subject to further changes in release/Makefile.)

Sponsored by:	DARPA, AFRL
Reviewed by:	ian, ray
2013-01-22 21:10:03 +00:00
Brooks Davis 12dd8cb14c Replace all known uses of ln in the build process with appropriate
install -l invocations via new INSTALL_LINK and INSTALL_SYMLINK
variables.

Sponsored by:	DARPA, AFRL
Reviewed by:	ian, ray, rpaulo
2013-01-21 22:40:39 +00:00
Brooks Davis dbc6339b41 In r245571, "rm -rf <foo>; ln -s <bar> <foo>" needed to be replaced with
"ln -sfh <bar> <foo>" or the links would fail when a valid link to a
directly was in place at <foo>.

Reported by:	peter
Tested by:	peter
Pointy hat to:	brooks
2013-01-17 23:05:03 +00:00
Brooks Davis 62bc689aa6 In preparation for logging metadata about each filesystem object
refactor the link section of distrib-dirs to alwasy install to a full
path (the link contents remain relative as they should).

Eliminate the use of the "rm -r[f] <foo>; ln -s <bar> <foo>" pattern in
favor of "ln -sf <bar> <foo>".  None of these links could be directories
on a system installed in the last decade.

Sponsored by:	DARPA, AFRL
Reviewed by:	mtree
2013-01-17 20:21:30 +00:00
Brooks Davis 75534bda19 Rework the mtree portion of etc/Makefile's distrib-dirs target to run
mtree in a shell loop so there is only one mtree commandline.  Move the
implementation of LOCAL_MTREE into etc/Makefile.

Sponsored by:	DARPA, AFRL
Reviewed by:	mtree :)
2013-01-17 18:32:30 +00:00
Bjoern A. Zeeb 4f22608e54 Add a conditional sleep 1 in case we add any IPv6 addresses to interfaces.
Do this per jail started, not per address.  This will allow DAD to complete
and services to properly start.   Before we have seen problems with services
trying to start before the IPv6 address was available to use and thus
erroring and failing to start.

MFC after:	3 days
2013-01-17 01:27:39 +00:00
Brooks Davis f402e53940 According to the notes in ObsoleteFiles.inc we last installed section
1aout manpages in 2002.  Stop making the directories and links to them.
2013-01-16 23:16:41 +00:00
Brooks Davis 41a8e2231d Add an option DB_FROM_SRC to use src/etc's user/group databases when
installing.  This allows things like running installworld for 10-CURRENT
on a 9.0-RELEASE system without adding extra users and groups to the
passwd and group files.

To prevent potentially risky uid/gid mismatches on systems with
non-standard local values, require that DESTDIR be set if DB_FROM_SRC is
set.

Sponsored by:	DARPA, AFRL
Reviewed by:	peter
2013-01-15 00:12:34 +00:00
Brooks Davis 0fc1aae5e2 Revert r245316. Systems with non-standard uids/gids are more prevalent
that I'd feared.  Discussion is ongoing about the scope of a safer
solution.
2013-01-11 23:44:35 +00:00
Brooks Davis 7ee2bf94f7 Use the -N option to install and nmtree to eliminate the need for the
checks for missing users and groups.

Sponsored by:	DARPA, AFRL
2013-01-11 23:08:19 +00:00
Steven Hartland 7ef204a2a9 Allow perl scripts to be used in rc.d scripts
PR:		conf/117027
Reviewed by:	pjd (mentor)
Approved by:	hrs
MFC after:	2 weeks
2013-01-10 11:08:22 +00:00
Peter Wemm 060e82fc34 Not using the full domain was a really bad idea. 2013-01-06 19:25:42 +00:00
Erwin Lansing 8604d7559a Update with new IPv4 address for D root.
Approved by:	delphij (mentor)
2013-01-04 09:15:59 +00:00
Gregory Neil Shapiro 83afcb6417 Minor changes to force commit these files so new freebsd*.cf files are
built to use the new sendmail-8.14.6/cf tree.

While here, update DNSBL link once again.

MFC after:	4 days
2012-12-29 20:42:28 +00:00
Gregory Neil Shapiro f20a1a6e26 Add missing closing quote on commented out example
PR:		bin/174108
Obtained from:	Julian H. Stacey
MFC after:	1 day
2012-12-29 19:57:52 +00:00
Hajimu UMEMOTO 1e2c3a2917 Fix location of /var/audit/dist and /var/audit/remote.
Note that those who did installworld after r243752 should
remove wrongly created /var/dist and /var/remote.

Reviewed by:	pjd
2012-12-28 10:42:01 +00:00
Mark Johnston 0191c2dfa8 Don't reload syslogd after rotating sendmail.st, as this file isn't
managed by syslogd.

PR:		conf/169973
Approved by:	rstone (co-mentor)
MFC after:	1 week
2012-12-20 23:18:36 +00:00
Baptiste Daroussin 203d428e21 make installation of the 220.backup-pkgdb periodic script depend on PKGTOOLS
knob
2012-12-20 11:39:20 +00:00
Andrey Zonov b944c830ba - Set memorylocked limit to 64Kb for default login class.
This prevents unprivileged users to lock too much memory.
- Set memorylocked limit to 64Mb for daemon login class.
  Some daemons such as amd(8) and watchdogd(8) calls mlockall(2) on
  startup, they are run from init(8) which uses daemon login class.
- Set memorylocked limit to unlimited for root login class.

Suggested by:	avg
Approved by:	kib (mentor)
MFC after:	1 week
2012-12-18 07:27:50 +00:00
Pawel Jakub Dawidek 11631ad0d6 Use new savecore(8) option and limit number of kernel dumps that will
be kept around to the 10 most recent ones.

Add UPDATING entry with info how to return to the previous behaviour (no
limits).

Obtained from:	WHEEL Systems
2012-12-16 23:29:56 +00:00
Hans Petter Selasky 0d8a95f1b8 Regenerate usb.conf
MFC after:	1 week
2012-12-15 10:56:16 +00:00
Pawel Jakub Dawidek 349d039bdb - When checking if a dump exists on the given device there is no need to
provide dump directory. Eliminate this redundant argument. This changes
  the usage, but the only risk here is that a warning will be printed
  about directory given as device.

- Update usage of -C option.

- When clearing dump header from the given device there is also no need to
  provide dump directory, although additional arguments for -c were not
  documented.

- Document that -v can be used with -c and that list of devices can be given.

Obtained from:	WHEEL Systems
2012-12-14 15:12:08 +00:00
Xin LI da178c777f Teach sysctl(8) about parsing a file (while I'm there also give it
capability of parsing both = and : formats).

Submitted by:	hrs (initial version, bugs are mine)
MFC after:	3 months
2012-12-13 23:32:47 +00:00
Pawel Jakub Dawidek 33da94038e Fix the location of auditdistd configuration file.
Reported by:	Johan Hendriks <joh.hendriks@gmail.com>
2012-12-13 09:41:32 +00:00
Xin LI c68dd1cf0f Sync pf.os with OpenBSD:
add a handful of linux signatures from p0fv2 and some other
signatures from observation.

MFC after:	2 weeks
2012-12-10 20:52:52 +00:00
Adrian Chadd 2f760a0455 Add a new 900MHz GSM regulatory SKU for the Xagyl Communications XC900M.
The XC900M acts as a Ubiquiti XR9 (and I _think_ SR9) by default;
it uses the same 900MHz<->2.4GHz downconverter mapping.

However it has an alternative frequency mapping which squeezes in a couple
more half/quarter rate channels.  Since the default HAL doesn't support
fractional tuning (sub-1MHz) in 2.4GHz mode on the AR5413/AR5414, they
implement it using a jumper.

Datasheet: http://www.xagyl.com/download/XC900M_Datasheet.pdf

Thankyou to Xagyl Communications for the XC900M NICs and Edgar Martinez
for organising the donation.

Tested:

* XC900M <-> XC900M
* Ubiquiti XR9 <-> XC900M

TODO:

* Test against SR9 and GZ901 if possible (the IEEE channel<->frequency
  mapping may not match up, thanks to the slightly different channels
  involved)
2012-12-07 06:34:46 +00:00
Eitan Adler 01d9852a4d Remove hack to emulate effective uid and just use the EUID's name in the
first place.  I was unaware of this option when originally committing
this change.

Submitted by:	gcooper
Approved by:	cperciva
MFC after:	3 days
2012-12-05 13:56:39 +00:00
Robert Watson 16648b4fff Merge a number of changes required to hook up OpenBSM 1.2-alpha2's
auditdistd (distributed audit daemon) to the build:

- Manual cross references
- Makefile for auditdistd
- rc.d script, rc.conf entrie
- New group and user for auditdistd; associated aliases, etc.

The audit trail distribution daemon provides reliable,
cryptographically protected (and sandboxed) delivery of audit tails
from live clients to audit server hosts in order to both allow
centralised analysis, and improve resilience in the event of client
compromises: clients are not permitted to change trail contents
after submission.

Submitted by:	pjd
Sponsored by:	The FreeBSD Foundation (auditdistd)
2012-12-01 15:11:46 +00:00
Hans Petter Selasky 6f786dc92b Regenerate usb.conf
MFC after:	1 week
2012-11-28 18:37:20 +00:00
Gleb Smirnoff 3fc38dbfb8 Fix typo in weekly line which made it to rotated after reaching > 1 Kb.
PR:		conf/173857
Submitted by:	Matt Smith <matt xtaz.co.uk>
2012-11-26 19:42:38 +00:00
Chris Rees 611a799088 Revert r243228. This commit appears to cause more trouble than
it was designed to avoid; the issue described in the PR was no
longer an issue anyway.
2012-11-21 18:12:28 +00:00
Hiroki Sato c426f75e3b Do not put "already running" message when rc_quiet=yes.
PR:	bin/165477
2012-11-20 04:45:04 +00:00
Chris Rees 0a1285e72b cp -R misses out dotfiles; use pax instead to copy file hierarchies
PR:		conf/99721 (based on)
Submitted by:	Florian Zavatzki <f_zavatzki@blue-network.org>
Approved by:	hrs
MFC after:	1 month
2012-11-18 14:21:05 +00:00
Hiroki Sato a2aa7473f3 Fix condition to check if the maximum number of FIBs is greater than 0 or not.
Spotted by:	zont
2012-11-18 11:22:15 +00:00
Hiroki Sato 73d473aecf Use -fib N modifier to add/delete a route to/from multiple FIBs. 2012-11-17 21:44:02 +00:00
Hiroki Sato 571b26027e Add check_namevarlist() to check if ${name}_var is reserved in rc.subr or not. 2012-11-17 18:11:10 +00:00
Eitan Adler f4dc482683 last commit was a mistake
Pointyhat to: me (for real)
Approved by: cperciva (implicit)
2012-11-16 14:25:13 +00:00
Eitan Adler 94e7929e2c dot.login is supposed to be for bourne shell, not csh
Pointyhat to: me
Approved by: cperciva (implicit)
2012-11-16 04:25:35 +00:00
Eitan Adler 7ccabb05a7 Using set -x produces output on stderr instead of stdout.
It also doesn't work with make -s.
Prefer the use of builtin make features.

PR:		misc/126312
Reported by:	Nejc Skoberne <nejc@skoberne.net>
Submitted by:	bdrewery
Approved by:	cperciva
MFC after:	1 week
2012-11-15 20:37:38 +00:00
Eitan Adler d207a5583c Only pass ip[46].addr when _addrl contains a value
Submitted by:	crees
Reviewed by:	Mike Jakubik <mike.jakubik@intertainservices.com>
Approved by:	cperciva
MFC after:	2 weeks
2012-11-15 15:06:15 +00:00
Nick Hibma fa020d40d1 Not only load pccard_ether settings, also load network settings. This
is only a problem when a /etc/rc.conf.d/network file is being used.

PR:		conf/160373
Submitted by:	n_hibma
MFC after:	1 week
2012-11-08 20:34:12 +00:00
Marcel Moolenaar 4d9f529cd5 The first line must contain "Content-Type:". Move the $FreeBSD$
keyword line to the comment block underneath.

Submitted by:	Garrett Cooper <yanegomi@gmail.com>
2012-11-07 00:19:30 +00:00
Baptiste Daroussin 4cbff7a3dc Change default prompt to show ~ again for the home directory
Submitted by:	flo
Approved by:	eadler
2012-11-04 01:00:35 +00:00
Eitan Adler 382dc3ca38 Revert the change that makes less default.
Since I've committed this I've receieved roughly an equal
amount of email thanking me for making this change
and asking me to revert it.

I've resisted making this change because
new users tend to prefer less over more
and these users are the least likely to know
how to change the PAGER on their own.

Requested by:	many
Objected to:	just as many
Decision made by:	core
Approved by:	cperciva
MFC after:	3 days
2012-11-03 14:46:15 +00:00
Eitan Adler 806b1fa0e7 10 years too late add support for "2.88MB 3.5in Extra High Density"
floppies.

Its unlikely that anyone actually uses these or cares about these
anymore, since we support other floppy types and this change doesn't
hurt - just add it.

PR:		conf/40777
Submitted by:	Antti Kantee <pooka@cubical.fi>
Arrival-Date:	Fri Jul 19 08:50:02 PDT 2002
Approved by:	cperciva (implicit)
MFC after:	1 week
2012-11-02 00:17:30 +00:00
Eitan Adler aad12c28e0 The test fails with "exit 1" if /usr/games/fortune doesn't actually
exist.  Fix that.

PR:		conf/71994
Submitted by:	Mikael Eklund <rma@ludd.ltu.se>
Reviewed by:	crees
Reviewed by:	jilles
Approved by:	cperciva (implicit)
MFC after:	3 days
2012-11-01 19:38:03 +00:00
Hiroki Sato 859aa11dce Load ipdivert.ko when natd_enable=YES.
PR:	conf/167566
2012-10-29 06:31:51 +00:00
Hiroki Sato c58c2dc7d5 Add setfib(1) support for services as <name>_fib in rc.conf. 2012-10-27 19:09:09 +00:00
Chris Rees b2de5bffb6 Allow spaces in _chroot
Noticed by:	adj (IRC/#bsdports)
Approved by:	hrs
MFC after:	1 month
2012-10-27 17:43:30 +00:00
Hiroki Sato 274b8658fc Fix an issue when ipv6_enable=YES && ipv6_gateway_enable=YES which could
prevent rtadvd(8) from working as intended.

Spotted by:	brian
Discussed with:	brian
2012-10-27 17:06:26 +00:00
Brian Somers 7c88121831 Enable "accept_rtadvd" on interfaces running rtadvd.
Without this, rtadvd runs but never advertises a default (IPv6) route.

MFC after:	1 week
2012-10-25 08:37:08 +00:00
Marcel Moolenaar c175365cec Add ATF to the build. This is may be a bit rought around the egdes,
but committing it helps to get everyone on the same page and makes
sure we make progress.

Tinderbox breakages that are the result of this commit are entirely
the committer's fault -- in other words: buildworld testing on amd64
only.

Credits follow:

Submitted by:	Garrett Cooper <yanegomi@gmail.com>
Sponsored by:	Isilon Systems
Based on work by:	keramida@
Thanks to:	gnn@, mdf@, mlaier@, sjg@
Special thanks to:	keramida@
2012-10-22 01:18:41 +00:00
Hajimu UMEMOTO a807918c78 Set default for ${pkg_info} like ${pkg_version}.
MFC after:	1 week
2012-10-20 18:13:20 +00:00
Hajimu UMEMOTO 57d1380d51 Use correct INDEX on 10-CURRENT. 2012-10-20 18:05:27 +00:00
Baptiste Daroussin 2394542b4e pkg_add is no more the default tool, make motd recommand using pkg install instead of pkg_add 2012-10-20 14:54:49 +00:00
Ulrich Spörlein e4d7d10517 Merge mandoc from vendor into contrib and provide the necessary Makefile glue.
It's not yet connected to the build.
2012-10-19 22:21:01 +00:00
Peter Jeremy f2118deb8c Explicitly specify 'np' so that getty(8) does not simulate even parity on
local.9600.  Whilst the actual binary termios(4) definitions and preceeding
comments for local.9600 indicate that parity is disabled, getty(8)
internally simulates parity based on the presence or absence of the 'np'
flag.

PR:		conf/76226
Submitted by:	peter
Approved by:	grog (co-mentor)
MFC after:	1 month
2012-10-18 22:20:02 +00:00
Attilio Rao 2e564269d0 Disconnect non-MPSAFE SMBFS from the build in preparation for dropping
GIANT from VFS. In addition, disconnect also netsmb, which is a base
requirement for SMBFS.

In the while SMBFS regular users can use FUSE interface and smbnetfs
port to work with their SMBFS partitions.

Also, there are ongoing efforts by vendor to support in-kernel smbfs,
so there are good chances that it will get relinked once properly locked.

This is not targeted for MFC.
2012-10-18 12:04:56 +00:00
Attilio Rao a42ac676f5 Disconnect non-MPSAFE NTFS from the build in preparation for dropping
GIANT from VFS. This code is particulary broken and fragile and other
in-kernel implementations around, found in other operating systems,
don't really seem clean and solid enough to be imported at all.
If someone wants to reconsider in-kernel NTFS implementation for
inclusion again, a fair effort for completely fixing and cleaning it
up is expected.

In the while NTFS regular users can use FUSE interface and ntfs-3g
port to work with their NTFS partitions.

This is not targeted for MFC.
2012-10-17 11:30:00 +00:00
Attilio Rao e6116d5b8e Disconnect non-MPSAFE NWFS from the build in preparation for dropping
GIANT from VFS. In addition, disconnect also netncp, which is a base
requirement for NWFS.

In the possibility of a future maintenance of the code and later
readd to the FreeBSD base, maybe we should think about a better location
for netncp. I'm not entirely sure the / top location is actually right,
however I will let network people to comment on that more specifically.

This is not targeted for MFC.
2012-10-17 11:16:17 +00:00
Attilio Rao 55793cdccf Disconnect non-MPSAFE PORTALFS from the build in preparation for dropping
GIANT from VFS.

This is not targeted for MFC.
2012-10-16 09:59:10 +00:00
Peter Wemm fee3ee9b2b mx1 -> smarthost.ysv 2012-10-15 14:14:21 +00:00
Hajimu UMEMOTO 72d27857dc Make a command for pkg_info changeable like pkg_version in
/etc/periodic/weekly/400.status-pkg to be friendly with pkgng.

MFC after:	1 week
2012-10-13 14:45:42 +00:00
Peter Wemm 5c0b56183b Point freebsd.org cluster machines to mx1 for their smarthost. 2012-10-11 20:46:04 +00:00
Hans Petter Selasky f36911a33c Regenerate usb.conf
MFC after:	1 week
2012-10-01 06:48:59 +00:00
Hans Petter Selasky 08f950a302 Make sure moused is exiting as quick as possible after that the
umsX character device returns a read error. Update devd.conf rules
to use "DEVFS" events which are generated after that the umsX
character device node has been created/destroyed, and then there
should be no need for moused to wait up to 10 seconds for umsX to
be ready. Opening umsX should not fail except if the kernel is low
on memory. In that case the user can replug the USB mouse or use
"usbconfig" to reset the device. In case of USB mouse devices,
moused should neither retry to open its character device,
once the first read error has happened. This is an indication
of device detach.

MFC after:	1 week
2012-09-24 17:13:33 +00:00
Jim Harris a724927cf3 Integrate nvmecontrol(8) into the amd64 and i386 builds.
This includes adding NVMe header files to /usr/include/dev/nvme.

Sponsored by:  Intel
2012-09-17 21:41:38 +00:00
Andriy Gapon 07dddf4e84 rc.d/power_profile: use recently added Cmax for cx_lowest
Trying to determine current lowest C-state after an AC event is racy
with C-states actually being changed by ACPI platform and kernel driver.

MFC after:	3 weeks
2012-09-11 06:25:10 +00:00
David E. O'Brien 8801556beb Simply things so that "#REQUIRE: FILESYSTEMS" means the file
systems are fully "ready to go".

'FILESYSTEMS' states: "This is a dummy dependency, for services which
require file systems to be mounted before starting."  However, we have
'var' which is was run after 'FILESYSTEMS' and can mount /var if it
already isn't mounted.  Furthermore, several scripts cannot use /var
until 'cleanvar' has done its thing.  Thus "FILESYSTEMS" hasn't really
meant all critical file systems are fully usable.
2012-09-11 05:04:59 +00:00
David E. O'Brien 7e71f1e85c Add postrandom. 2012-09-11 04:53:32 +00:00
Dag-Erling Smørgrav c2b4a4036b Add a configtest command.
Submitted by:	gjb@
MFC after:	1 week
2012-09-04 21:56:16 +00:00
David E. O'Brien 203b2f2fa4 * Rather than run the same 'ps' command twice, add 'kenv' which often
gives machine unique values from the firmware.
* The kernel is more likely to be unique than /bin/ls (but no need to
  stuff many megabytes into /dev/random, so hash it).
* Change ordering to give larger variance across reboots to reduce
  predictability.
2012-09-04 21:47:09 +00:00
David E. O'Brien b8ea11cf79 Correct style. 2012-08-22 23:44:12 +00:00
David E. O'Brien b7aeb5b281 * Reinstate r128059's consumption of our best entropy first.
r128060 for "hardware-supplied entropy" reversed this without reason,
  seems a typo.
* Isolate "better than nothing" implementation to a function.

Submitted by:	obrien & Arthur Mesh <arthurmesh@gmail.com>
Sponsored by:	Juniper Networks
2012-08-22 23:37:24 +00:00
David E. O'Brien 2719ba5d0f The entire comment block is now spell checked this time -- I promise. 2012-08-22 22:34:55 +00:00
Xin LI 9130580bbd Allow - be used in the name of a provider. Without this change it's not
possible to specify a gptid in geli_devices.
2012-08-22 22:17:35 +00:00
David E. O'Brien 89e7132797 Fix comment misspelling.
Submitted by:	kargl
2012-08-22 20:56:53 +00:00
David E. O'Brien a23ec70a4e Depend on the new 'postrandom' instead of random.
We need to limit the amount of time between consuming the entropy seeds
and removing it in case of a kernel panic.
2012-08-22 18:49:02 +00:00
David E. O'Brien 7e7fd6c88d Remove old entropy seeding after consumption initializing /dev/random PRNG.
Not doing so opens us up to replay attacks.

Submitted by:	Arthur Mesh <arthurmesh@gmail.com>
Sponsored by:	Juniper Networks
2012-08-22 18:43:21 +00:00
David E. O'Brien 849d3c12df Add dependencies based on security(7). 2012-08-22 18:35:17 +00:00
Xin LI 82607d1ec1 As of r232844 we no longer need the maxpoll 9 workaround.
MFC after:	3 days
2012-08-20 18:45:16 +00:00
Dimitry Andric 7ae0e2c9f0 Upgrade our copy of llvm/clang to trunk r162107. With thanks to
Benjamin Kramer and Joerg Sonnenberger for their input and fixes.
2012-08-20 18:33:03 +00:00
Jun Kuriyama 9b9bfdcc30 - Allow to pass extra parameters for each jails.
- To achieve above, convert jail(8) invocation to use new style
  command line "-c" flag.

Reviewed at:	freebsd-jail@
2012-08-19 08:15:32 +00:00
Hans Petter Selasky f167692215 Regenerate usb.conf
MFC after:	2 weeks
2012-08-05 11:53:16 +00:00
Devin Teske 41e0047a15 Revert SVN r238628 (mistake). 2012-07-19 22:41:00 +00:00
Devin Teske f316f2c30c Fix syntax errors (s/:=/:-/).
Reviewed by:	emaste (mentor)
Approved by:	emaste (mentor)
MFC after:	3 days
2012-07-19 22:33:13 +00:00
Maksim Yevmenkin 78cf63fc10 Allow to specify no source-address-selection policy
MFC after:	1 week
2012-07-19 15:36:36 +00:00
Joerg Wunsch 5cb470c830 Add share/examples/libusb20 to the list of directories. 2012-07-19 11:18:41 +00:00
Dag-Erling Smørgrav d256f21a9a Move -n ${_jail} before ${_flags} so that any -n options in ${_flags}
will override ours instead of the other way around.
2012-07-18 23:01:23 +00:00
Brooks Davis ba7f643097 MFP4 214344:
Tighten the regular expression that checks for an md /tmp such that
no /tmp mount and an md / isn't improperly matched.

Sponsored by:	DARPA/AFRL
2012-07-13 20:10:59 +00:00
Kevin Lo 1424b561e1 Whitespace nit 2012-07-13 06:46:09 +00:00
Hiroki Sato 5a6d2079d5 Fix a missing ";". 2012-07-09 20:11:32 +00:00
Hiroki Sato ef23194991 - Add IFT_L2VLAN (vlan(4)) support.
- Add -P option to support PID file.  When -a is specified /var/run/rarpd.pid
  is used, and when an interface is specified /var/run/rarpd.<ifname>.pid is
  used by default.
2012-07-09 08:11:16 +00:00
Hiroki Sato 8efbd296e0 Make ipfw0 logging pseudo-interface clonable. It can be created automatically
by $firewall_logif rc.conf(5) variable at boot time or manually by ifconfig(8)
after a boot.

Discussed on:	freebsd-ipfw@
2012-07-09 07:16:19 +00:00
Dag-Erling Smørgrav 7f8492ba48 Name jails automatically.
MFC after:	1 week
2012-07-04 13:37:44 +00:00
Sean Bruno 55fb7f3673 Revert r238004 as more review has come in and there is now a discussion
on how to best proceed.
2012-07-02 17:55:29 +00:00
Sean Bruno 7402aad3c7 Cosmetic display change of Cx states via cx_supported sysctl entries.
Adjust power_profile script to handle the new world order as well.

Some vendors are opting out of a C2 state and only defining C1 & C3.  This
leads the acpi_cpu display to indicate that the machine supports C1 & C2
which is caused by the (mis)use of the index of the cx_state array as the
ACPI_STATE_CX value.

e.g. the code was pretending that cx_state[i] would
always convert to i by subtracting 1.

cx_state[2] == ACPI_STATE_C3
cx_state[1] == ACPI_STATE_C2
cx_state[0] == ACPI_STATE_C1

however, on certain machines this would lead to
cx_state[1] == ACPI_STATE_C3
cx_state[0] == ACPI_STATE_C1

This didn't break anything but led to a display of:
 * dev.cpu.0.cx_supported: C1/1 C2/96

Instead of
 * dev.cpu.0.cx_supported: C1/1 C3/96

MFC after:	2 weeks
2012-07-02 16:57:13 +00:00
Christian Brueffer e19c9e1ed5 Similar to all.log, mention that /var/log/console.log has to be created and chmod'ed
to make logging work.

PR:		168889
Submitted by:	Robert Simmons <rsimmons0@gmail.com>
MFC after:	1 week
2012-07-01 12:34:19 +00:00
John Baldwin f0e130f7b7 Only output a list of file systems that need to be dumped if the system
has a non-empty dumpdates file.

Reviewed by:	brooks
MFC after:	1 week
2012-06-20 20:01:51 +00:00
David E. O'Brien 2e0c6b7ac0 Install filemon.h into /usr/include for userland consumption. 2012-06-20 00:09:47 +00:00
Dag-Erling Smørgrav 3acb6d160f Passive mode is the default, and has been for a while.
MFC after:	1 week
2012-06-19 14:47:07 +00:00
Dag-Erling Smørgrav b4f560356a Switch the default password hash from md5 to sha512.
MFC after:	1 week
2012-06-19 14:46:18 +00:00
Dag-Erling Smørgrav 7c5a921699 Finally nuke auth.conf, nine years after it was deprecated. The only
thing it was still used for was to set the "global default" password
hash.  Since the stock auth.conf contained nothing but comments, the
global default was actually the first algorithm in crypt(3)'s list,
which happens to be DES; I take the fact that nobody noticed as proof
that it was not used outside of crypt(3).

The only other use in our tree was in the Kerberos support code in
in tinyware's passwd(1).  I removed that code in an earlier commit;
it would not have compiled anyway, as it only supported Kerberos IV.

The auth_getval() function is now a stub that always returns NULL,
which has the same effect as a functional auth_getval() with an
empty auth.conf.

MFC after:	3 weeks
2012-06-12 17:02:53 +00:00
Eitan Adler d81a84a9bc Don't attempt to delete .sujournal in /tmp
PR:		conf/163828
Submitted by:	Tatsuki Makino <tatsuki_makino@hotmail.com>
Approved by:	cperciva
MFC after:	1 week
2012-05-30 03:51:46 +00:00
Martin Wilke 57eef2a0b2 - FreeBSD ships a KDE PAM module in base, but it's missing support for passwordless login (kde-np),
and it doesn't really belong in base system.

PR:		misc/167261
Submitted by:	avilla@
Approved by:	rwatson (mentor)
MFC after:	3 days
2012-05-30 03:10:22 +00:00
Hans Petter Selasky 9d569918e6 Regenerate usb.conf
MFC after:	3 days
2012-05-21 15:01:35 +00:00
George V. Neville-Neil 4d37a12307 Add support for our own DTrace scripts and those from the DTraceToolkit
to the build system.  FreeBSD written scripts are stored in
src/share and the toolkit scripts are brought from the cddl directory
into a working tree via install.

MFC after:	2 weeks
2012-05-18 16:40:15 +00:00
Grzegorz Bernacki 7f725bcd5c Import work done under project/nand (@235533) into head.
The NAND Flash environment consists of several distinct components:
  - NAND framework (drivers harness for NAND controllers and NAND chips)
  - NAND simulator (NANDsim)
  - NAND file system (NAND FS)
  - Companion tools and utilities
  - Documentation (manual pages)

This work is still experimental. Please use with caution.

Obtained from: Semihalf
Supported by:  FreeBSD Foundation, Juniper Networks
2012-05-17 10:11:18 +00:00
Eitan Adler 833cabc9a1 Submitted by: gavin, pjd
Approved by:	cperciva
MFC after:	3 days
2012-05-09 17:29:07 +00:00
John Baldwin 25d56d8dcc Display dropped transmit packets in the daily network interface output.
PR:		conf/165956
Submitted by:	Jeremy Chadwick
MFC after:	1 week
2012-05-07 15:41:31 +00:00
Stanislav Sedov 51506f39f4 - Change kfd rc script to be more conformant with rcNG conventions:
o change rcname to kfd;
  o move mandatory options to command_args;
  o add missing "shutdown" keyword;
  o fix require line.  Kfd doesn't really need to be started before
    daemons.

Suggested by:	dougb
2012-05-06 20:46:04 +00:00
John Baldwin b8cb2346fc - Don't log messages saying that accounting is being disabled and enabled
if the accounting log file is atomically replaced with a new file
  (such as during log rotation).
- Simplify accounting log rotation a bit.  There is no need to re-run
  accton(8) after renaming the new log file to it's real name.

PR:		kern/167321
Tested by:	Jeremy Chadwick
2012-05-02 14:25:39 +00:00
Dimitry Andric dff0c46c97 Upgrade our copy of llvm/clang to trunk r154661, in preparation of the
upcoming 3.1 release (expected in a few weeks).  Preliminary release
notes can be found at: <http://llvm.org/docs/ReleaseNotes.html>

MFC after:	2 weeks
2012-04-16 21:23:25 +00:00
Eitan Adler bf98096218 - remove the length shortening on the path
- make the default prompt a bit more like scp
- make the user show as root even when using 'su' instead of 'su -'
- the key bindings didn't hurt anything but likely hide a bug
- merge history instead of overwriting it

Submitted by:	gavin, joel
Approved by:	cperciva
2012-04-11 14:13:22 +00:00
Stanislav Sedov 7e2d4dcd24 - Add rc.d script for kfd, kerberos forwarded tickets daemon. 2012-04-10 09:27:41 +00:00
Ivan Voras 1c78ab7317 Add MySQL port 3306
Obtained from:	http://www.iana.org/assignments/port-numbers
MFC after:	1 week
2012-03-26 11:48:47 +00:00
Eitan Adler 7ba657625c Fix build by adding new directory to mtree in r233429
Submitted by:	flo
Approved by:	cperciva
MFC after:	1 week
2012-03-24 21:10:19 +00:00
Eitan Adler 1233083107 - Make the default values for tcsh more user friendly
- Add an examples file with many of the not accepted suggestions from the discussion

PR:		conf/160689
Reviewed by:	many
Discussed on:	current
Approved by:	cperciva
2012-03-24 18:43:18 +00:00
Sergey Kandaurov 1554a84e91 Clean up of fs/fifofs include directory after fifo.h removal.
Glanced by:	kib
2012-03-23 10:12:35 +00:00
Stanislav Sedov ae77177087 - Update FreeBSD Heimdal distribution to version 1.5.1. This also brings
several new kerberos related libraries and applications to FreeBSD:
  o kgetcred(1) allows one to manually get a ticket for a particular service.
  o kf(1) securily forwards ticket to another host through an authenticated
    and encrypted stream.
  o kcc(1) is an umbrella program around klist(1), kswitch(1), kgetcred(1)
    and other user kerberos operations. klist and kswitch are just symlinks
    to kcc(1) now.
  o kswitch(1) allows you to easily switch between kerberos credentials if
    you're running KCM.
  o hxtool(1) is a certificate management tool to use with PKINIT.
  o string2key(1) maps a password into key.
  o kdigest(8) is a userland tool to access the KDC's digest interface.
  o kimpersonate(8) creates a "fake" ticket for a service.

  We also now install manpages for some lirbaries that were not installed
  before, libheimntlm and libhx509.

- The new HEIMDAL version no longer supports Kerberos 4.  All users are
  recommended to switch to Kerberos 5.

- Weak ciphers are now disabled by default.  To enable DES support (used
  by telnet(8)), use "allow_weak_crypto" option in krb5.conf.

- libtelnet, pam_ksu and pam_krb5 are now compiled with error on warnings
  disabled due to the function they use (krb5_get_err_text(3)) being
  deprecated.  I plan to work on this next.

- Heimdal's KDC now require sqlite to operate.  We use the bundled version
  and install it as libheimsqlite.  If some other FreeBSD components will
  require it in the future we can rename it to libbsdsqlite and use for these
  components as well.

- This is not a latest Heimdal version, the new one was released while I was
  working on the update.  I will update it to 1.5.2 soon, as it fixes some
  important bugs and security issues.
2012-03-22 08:48:42 +00:00
Gleb Smirnoff 004cb95bae Rotate auth.log and messages at the beginning of a year. Otherwise,
daily security checks 800.loginfail and 900.tcpwrap may produce
false positive alerts.
2012-03-19 09:30:40 +00:00
Hans Petter Selasky d2c5981310 Regenerate usb.conf to use new -n option when doing kldload.
MFC after:	1 week
2012-03-18 09:52:54 +00:00
Martin Matuska 9f6e964d17 Unhide /dev/zfs in devfsrules_jail.
The /dev/zfs device is required for managing jailed ZFS datasets.

Discussed with:	pjd, jamie
MFC after:	1 week
2012-03-16 21:30:26 +00:00
Ed Schouten 4c2c7b2c94 Make init(8) slightly more robust when /dev/console is missing.
If the environment doesn't offer a working /dev/console, the existing
version of init(8) will simply refuse running rc(8) scripts. This means
you'll only have a system running init(8) and nothing else.

Change the code to do the following:

- Open /dev/console like we used to do, but make it more robust to use
  O_NONBLOCK to prevent blocking on a carrier.
- If this fails, use /dev/null as stdin and /var/log/init.log as stdout
  and stderr.
- If even this fails, use /dev/null as stdin, stdout and stderr.

So why us this useful? Well, if you remove the `getpid() == 1' check in
main(), you can now use init(8) inside jails to properly execute rc(8).
It still requires some polishing, as existing tools assume init(8) has
PID 1.

Also it is now possible to use use init(8) on `headless' devices that
don't even have a serial boot console.
2012-03-14 16:22:09 +00:00
Ed Schouten 93bd0cdedd Hide stty(1) errors.
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
2012-03-14 16:10:39 +00:00
Bjoern A. Zeeb 9f0b9a0853 Rather than printing the output from route add for all FIBs just print them
for the default FIB followed by a statement with a list of FIB numbers for
all the other FIBs we install the routes for.

Request by:	kib (to make it less noisy)
Tested by:	kib
MFC after:	3 days
2012-03-04 18:53:35 +00:00
David Chisnall a8ed63bb3d Reapply 227753 (xlocale cleanup), plus some fixes so that it passes build
universe with gcc.

Approved by:	dim (mentor)
2012-03-04 15:31:13 +00:00
Justin Hibbits 3cc28bd9bf Add backlight control to ATI-graphics PowerBooks and iBooks.
Approved by:	nwhitehorn (mentor)
MFC after:	1 week
2012-02-26 13:45:25 +00:00
Xin LI 90de8d2a65 Put the signal trap output to standard error instead of standard output.
Without this change, pressing ^T could result in rc.d script putting
junk strings like:

	Script <filename> running

in configuration files when redirecting standard output to these files.

MFC after:	2 weeks
2012-02-18 00:46:18 +00:00
Doug Barton 81ed1a1e1b Increase the default shutdown timer to 90 seconds. This will allow
certain systems that take a long time to shut down, without adversely
affecting things that shut down quickly. It's also 30 seconds less than
the default hard limit of 120 seconds in kern.init_shutdown_timeout.

PR:		conf/109272
Submitted by:	Radim Kolar SF.NET <hsn@sendmail.cz>
2012-02-17 07:59:37 +00:00
Bjoern A. Zeeb e17d7df80d Merge multi-FIB IPv6 support from projects/multi-fibv6/head/:
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
2012-02-17 02:39:58 +00:00
Eitan Adler f85a4a2977 Style: prefer the use of line continuations to +=
Requested by:	marcel, dougb, bde
Approved by:	cperciva
MFC after:	3 days
2012-02-17 01:21:08 +00:00
Bjoern A. Zeeb 9dba179d5e IFC @231845
Sponsored by:	Cisco Systems, Inc.
2012-02-17 00:27:48 +00:00
Dimitry Andric b74cf6dcf1 Revert r231673 and r231682 for now, until we can run a full make
universe with them.  Sorry for the breakage.

Pointy hat to:	     me and brooks
2012-02-14 21:48:46 +00:00
David Chisnall 82dd5016bd Cleanup of xlocale:
- 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)
2012-02-14 12:03:23 +00:00
Doug Barton 20ceedfb69 Fix various issues with the NFS and RPC related scripts:
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.
2012-02-14 10:51:24 +00:00
Hans Petter Selasky d45fe33ddc Re-generate /etc/devd/usb.conf
MFC after:	1 day
2012-02-13 07:47:16 +00:00
Andriy Gapon 5a197b4612 start watchdogd before most of other daemons/servers
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
2012-02-12 14:58:50 +00:00
Ed Schouten 18568efd19 Avoid using BEFORE in the utx rc script.
Requested by:	dougb
2012-02-12 07:45:48 +00:00
Ed Schouten c21ae3a403 Move utmpx handling out of init(8).
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.
2012-02-11 20:47:16 +00:00
Doug Barton f7451733fb In the days before r208307 addswap was running early in the second stage
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.
2012-02-11 06:21:16 +00:00
Eitan Adler b169a33235 Make etc/Makefile more conflict resistant
PR:		conf/163789
Submitted by:	gcooper (iXsystems)
Approved by:	cperciva
MFC after:	3 days
2012-02-09 20:44:20 +00:00
Jung-uk Kim cc43a851d2 Revert r211288 and move the logic to the acpi_timer itself. 2012-02-08 20:31:42 +00:00
Doug Barton 95208e20d0 As it stands right now, the default devfs rulesets are only loaded as a
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.
2012-02-08 08:52:40 +00:00
Glen Barber 2f1602a7d1 Add an option to 404.status-zfs (enabled by default) to list all
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
2012-02-08 00:08:21 +00:00
Hiroki Sato 86b84592a8 Fix $ipv6_network_interfaces handling in rc.d/routing. It could fail when
it was set to "auto", for example.

MFC after:	3 days
2012-02-04 18:14:49 +00:00
Bjoern A. Zeeb b202f3dc89 Install the IPv6 reject routes we do for the default FIB to all FIBs.
Sponsored by:	Cisco Systems, Inc.
2012-02-03 15:31:47 +00:00
Hiroki Sato d830cea6b7 Perform IPv6 DAD only in ifn_start. 2012-01-29 08:33:34 +00:00
Justin Hibbits c0c8fcb92d Remove the notify match from a couple devd apple events, the events don't
include notify tags.

Approved by:	nwhitehorn (mentor)
MFC after:	3 days
2012-01-28 02:52:22 +00:00
Hiroki Sato f6e5ba31d2 Fix several glitches in IPv6-related knobs:
- 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
2012-01-22 10:57:32 +00:00
Brooks Davis 2dd3bcd48d When creating the jails /dev/log symlink, do it by full path to avoid
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
2012-01-20 22:55:19 +00:00
Eygene Ryabinkin edad1b5ba4 /etc/netstart: remove invocation of dhclient
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
2012-01-20 17:25:15 +00:00
Eygene Ryabinkin 1eea470950 dhclient: don't use syslog for logging non-DHCP interface errors
We should show the error to user, but it doesn't deserve syslog.

Approved by: jhb
2012-01-20 17:19:50 +00:00
Doug Barton 72fc1aafe2 If we're booting there is no need to waste time determining if the service
is running or not.

PR:		conf/150752
Submitted by:	YIN Xiaofeng <75394094@qq.com>
2012-01-20 10:31:27 +00:00
Doug Barton 61d4638e52 Now that its callers have been udpated, remove set_rcvar().
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.
2012-01-14 08:59:02 +00:00
Doug Barton 801c438304 Prepare for the removal of set_rcvar() by changing the rcvar=
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.
2012-01-14 02:18:41 +00:00
Eygene Ryabinkin 0113cca483 rc.d: document 'quiet' prefix and fix dhclient/devd interaction
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
2012-01-12 06:48:11 +00:00
Gleb Smirnoff 5c39f7bdeb Bunch of fixes to pfsync(4) module load/unload:
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
2012-01-09 08:50:22 +00:00
Doug Barton a194b02d88 There is no longer a need to abstract ${rcvar_manpage} as we are not
attempting to maintain compatibility with NetBSD for some years now.
2012-01-08 20:25:29 +00:00
Ulrich Spörlein 081dc98788 Spelling fixes for etc/ 2012-01-07 16:10:32 +00:00
Pawel Jakub Dawidek e3bf08680d Add 'nojail' keyword as auditd(8) can't really do anything useful when
inside a jail.

Discussed with:	rwatson
MFC after:	1 week
2012-01-06 14:00:31 +00:00
Pawel Jakub Dawidek 04d8001793 - Put one file into one line. This makes keeping local changes and merging
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
2011-12-15 21:06:37 +00:00
Gleb Smirnoff 84516ac070 Add compatibility support for specifing IPv4 aliases in
rc.conf without the "inet" keyword.

Obtained from:	hrs
2011-12-13 14:36:04 +00:00
Justin Hibbits 23ab37cb82 Fix style(9) issues from r228270.
Approved by:	nwhitehorn (mentor)
2011-12-05 14:13:21 +00:00
Justin Hibbits 6431ede397 Add a devd notification for closing/opening the lid on PowerBooks and iBooks.
Approved by:	nwhitehorn (mentor)
2011-12-05 00:12:10 +00:00
David E. O'Brien 59509bae0a Ensure kldxref is run first. Currently both 'kldxref' and 'kld' depend
on "FILESYSTEMS" and 'kld' is being run 8 scripts ahead of 'kldxref'.

Reported by:	dhw
2011-12-01 22:50:10 +00:00
David Chisnall 7a98470824 Import libc++ / libcxxrt into base. Not build by default yet (use
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)
2011-11-25 20:59:04 +00:00
Gleb Smirnoff 74ffd254b4 Better use pkill(1) in last commit.
Submitted by:	pjd
2011-11-21 12:23:22 +00:00
Gleb Smirnoff 4ccbfb3f84 On some laptops it is important to re-open /dev/psm after resume. moused(8)
was capable to do this upon SIGHUP for more than a decade. Automate this
via rc.resume in default installation.
2011-11-15 12:59:07 +00:00
Doug Barton 398955cd68 The default setting, daily_accounting_compress="NO", was causing
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>
2011-11-13 03:01:58 +00:00
Jilles Tjoelker e60150fafa rc.d: Eliminate some unnecessary non-POSIX constructs:
* set - ...
 * empty braces
 * ^ in character class
2011-11-08 23:02:32 +00:00
Dimitry Andric 66aa9b8dc9 Whenever you boot with nfsv4_server_enable=NO (the default) in rc.conf,
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
2011-11-05 16:47:47 +00:00
Eygene Ryabinkin 0c4b17e1e7 Fix handling of rc_force in /etc/rc.d/dhclient
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
2011-10-28 06:03:38 +00:00
Xin LI 8017fd8eb9 Increase default scrub threshold from 30 days to 5 weeks. Using
whole weeks makes it easier to predicate when the scrub would
happen.

MFC after:	1 week
2011-10-27 21:25:41 +00:00
Gavin Atkinson 349f3d11fb Remove example for linking /dev/vga to /dev/ttyv0, this hasn't been
required since X version 4.3.0.

PR:		conf/161847
Submitted by:	eadler
MFC after:	2 weeks
2011-10-27 20:39:20 +00:00
Gavin Atkinson 58fdb93577 Update the example rules in devfs.conf to reflect the changes since ATA_CAM.
While here, add another example rule, as many applications these days
expect to find /dev/dvd instead.

MFC after:	3 days
2011-10-27 20:35:21 +00:00
Hiroki Sato 0321b694c7 - Add support for a "!" character in regex matching in devd(8). It inverts
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
2011-10-26 02:11:28 +00:00
Martin Matuska 4d428b10ae Correctly reassign copyright of etc/rc.d/static_ndp back to delphij@
as the project itself is no legal entity

Reported by:	Joe Dahl <joel@vnode.se>
MFC after:	3 days
2011-10-23 10:17:42 +00:00
Martin Matuska dbedf61ce3 Add etc/rc.d/static_ndp, analogous to etc/rc.d/static_arp.
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
2011-10-23 09:08:42 +00:00
Hiroki Sato dec80d129b Add support for removing addresses added by ipv6_prefix_hostid_addr_up()
upon rc.d/netif stop.
2011-10-23 07:37:36 +00:00
Hiroki Sato 089ff57221 Fix an issue that 127/8 is not configured when $ifconfig_DEFAULT is not empty.
Spotted by:	ume
2011-10-23 05:56:59 +00:00
Hans Petter Selasky c8eeb97178 Add new USB IDs to RUN driver. Update usb.conf.
PR:		usb/161798
MFC after:	3 days
2011-10-19 10:09:01 +00:00
Stefan Eßer 8d68b75b54 Add missing default values for daily/800.scrub-zfs for documentation
purposes. No functional change, since all parameters are set to their
default values.
MFC after:	1 week
2011-10-17 14:37:24 +00:00
Stefan Eßer 3efd8ccdb5 Fix error message in case the backup storage directory does not exist and
cannot be created ($daily_backup_pkgdb_dbdir -> $daily_backup_pkgdb_dir).
MFC after:	1 week
2011-10-17 14:33:41 +00:00
Dag-Erling Smørgrav 32ca8e078d The rc_force test was inverted in the previous commit, so that dhclient ran
for interfaces which were not configured for DHCP *unless* rc_force was set;
the correct logic is to run dhclient for those interfaces *only if* rc_force
is set.

Broken by:	des@
Noticed by:	everybody and his dog
Submitted by:	rea@
PR:		bin/161733
2011-10-17 13:05:57 +00:00
Nathan Whitehorn b6faf3cfdb Add support for special keys (volume/brightness/eject) on Apple laptops with
ADB keyboards.

Submitted by:	Justin Hibbits <jrh29 at alumni dot cwru dot edu>
MFC after:	9.0-RELEASE
2011-10-16 21:01:42 +00:00
Dag-Erling Smørgrav 23f39c906b Make dhclient use a pid file. Modify the rc script accordingly; while
there, clean it up and add some error checks.

Glanced at by:	brooks@
MFC after:	3 weeks
2011-10-13 17:20:45 +00:00
Colin Percival b0efac1ceb Now that the portsnap buildbox is generating the raw bits for INDEX-9,
add it to the set of INDEX files built by portsnap.
2011-10-12 03:29:12 +00:00
Stanislav Sedov 7c450da7b4 - Import Heimdal 1.5 distribution. 2011-10-05 07:23:29 +00:00
Dimitry Andric 324d7156d7 Revive the LLVM and Clang license files, which were removed in my
too-thorough cleanup of unused files, in r213695.  Also make sure these
get installed under /usr/share/doc.

Submitted by:	rwatson, brooks
Pointy hat to:	dim
MFC after:	3 days
2011-09-29 18:12:40 +00:00
Stanislav Sedov 31f1e9c17f - Flatten the vendor heimdal tree. 2011-09-29 05:23:57 +00:00
Warren Block 762f55cd5f Fix a confusing sentence. [1]
Other wording tweaks.

Reviewed by:	imp [1]
Approved by:	gjb
2011-09-29 03:37:42 +00:00
Xin LI 89b1da1ba2 Test if the interface is afif in dhcpif() and syncdhcpif(), as
done in ipv6_autoconfif.

Reviewed by:	hrs (freebsd-rc@)
MFC after:	1 week
2011-09-28 19:01:15 +00:00
Konstantin Belousov a01fdfcef1 Install ciss(4) ioctl header (together with other .h files from sys/dev/ciss).
PR:	kern/109813
Discussued with:	Alex Samorukov <samm os2 kiev ua>
	(smartmontools maintainer)
MFC after:	1 week
2011-09-27 12:14:43 +00:00
Hiroki Sato 04303fd864 Use REQUIRE: line to reorder rc.d/bridge instead of BEFORE: line.
Pointed out by:	dougb
Approved by:	re (bz)
2011-09-20 00:37:35 +00:00
Hiroki Sato 33b9d9a8d2 Use resolvconf(8) to create /etc/resolv.conf, not directly overwrite it.
Approved by:	re (kib)
2011-09-19 15:56:50 +00:00
Hiroki Sato f8c5f6a6b8 Fix the script order to run rc.d/bridge after the initial network
interface configuration and before running network daemons.

Approved by:	re (kib)
2011-09-19 15:55:53 +00:00
Jaakko Heinonen 3fb4fa3574 Expose "log" in the default devfs rules. /etc/rc.d/jail creates /dev/log
as a symbolic link.

PR:		conf/160711
Submitted by:	Jase Thew
Approved by:	re (kib)
MFC after:	1 week
2011-09-15 13:32:43 +00:00
Doug Barton 073d48133f Correct the RFC number for the description of IPv6 privacy addressing
Reviewed by:	bz
Approved by:	re (kib)
2011-09-15 09:22:49 +00:00
Christian Brueffer 3ea459713b Minor spelling, wording and punctuation fixes in comments.
PR:		155984
Submitted by:	gcooper
Approved by:	re (kib)
MFC after:	1 week
2011-09-14 20:13:10 +00:00
Hiroki Sato d4358e709f - Add an warning when ifconfig_IF_ipv6 has no inet6 keyword in front
of an IPv6 address. (r225489)

- Use eval for ${ifconfig_args} to fix an issue fixed in r223506. (r225489)

Approved by:	re (bz)
2011-09-13 00:09:47 +00:00
Hiroki Sato 049087a0f3 Add $ipv6_cpe_wanif to enable functionality required for IPv6 CPE
(r225485).  When setting an interface name to it, the following
configurations will be enabled:

 1. "no_radr" is set to all IPv6 interfaces automatically.

 2. "-no_radr accept_rtadv" will be set only for $ipv6_cpe_wanif.  This is
    done just before evaluating $ifconfig_IF_ipv6 in the rc.d scripts (this
    means you can manually supersede this configuration if necessary).

 3. The node will add RA-sending routers to the default router list
    even if net.inet6.ip6.forwarding=1.

This mode is added to conform to RFC 6204 (a router which connects
the end-user network to a service provider network).  To enable
packet forwarding, you still need to set ipv6_gateway_enable=YES.

Note that accepting router entries into the default router list when
packet forwarding capability and a routing daemon are enabled can
result in messing up the routing table.  To minimize such unexpected
behaviors, "no_radr" is set on all interfaces but $ipv6_cpe_wanif.

Approved by:	re (bz)
2011-09-13 00:06:11 +00:00
Xin LI 4144951277 Sync pf.os with OpenBSD:
- Update OpenBSD fingerprints through OpenBSD 4.9
 - Fix typos.

Obtained from:	OpenBSD
MFC after:	2 weeks
Approved by:	re (kib)
2011-09-08 23:46:07 +00:00
Nathan Whitehorn 4cefd5cf3e Fix path to the handbook and provide a hint about how to install it if it
was not added at installation time.

Approved by:	re (blackend)
2011-08-26 14:05:48 +00:00
Xin LI aefb9fe04f Honor WITHOUT_IPX when installing etc/rc.d/ipxrouted.
MFC after:	1 week
Approved by:	re (kib)
2011-08-23 19:29:11 +00:00
Doug Barton 4116c8e738 Revert r224760, and enhance the sed patterns from r224659 to comment out
the _compat entries in the WITHOUT_NIS case rather then delete them.

Approved by:	re (kib)
2011-08-10 20:52:02 +00:00
Doug Barton c2aedca43b Rather than edit the nsswitch.conf file based on ${MK_NIS} == "no"
comment out the NIS _compat options by default, but leave them in
the file for the convenience of users who want to enable it.

Update the comment in the file accordingly.

Reviewed by:	ed
Approved by:	re (hrs)
2011-08-06 09:16:53 +00:00
Ed Schouten b41afd430d Remove NIS entries from /etc/nsswitch.conf for WITHOUT_NIS.
We already modify various configuration files in /etc based on build
configuration. This is not done for nsswitch.conf right now when setting
WITHOUT_NIS. This breaks various utilities, including crond, that depend
on working databases.

Approved by:	re (kib)
MFC after:	1 month
2011-08-05 17:33:12 +00:00
Doug Barton ab1779e30e Revert the apparently-unecessary module_path twiddling from r223917
Approved by:	re (kib)
2011-07-22 21:08:19 +00:00
Jilles Tjoelker 068c02de6d rc.d/routing: Fix ugly output with additional routing options.
Print a separate "Additional routing options" line for each address family
which has additional options, so that it does not get mixed up with the
output from adding routes.

This also reverts r224048 which added newlines to two arbitrary routing
options.
2011-07-17 14:52:55 +00:00
Doug Barton 75f93b2483 Commemorate the release of RFC 6303 by updating the comments regarding
our default empty zones.  No functional changes.
2011-07-17 06:20:47 +00:00
Doug Barton 3fed94a85e Pick up the 2011-06-08 update to this file, the addition of an IPv6
address for D.
2011-07-17 06:05:44 +00:00