Commit Graph

1296 Commits

Author SHA1 Message Date
Bryan Drewery
6662a8e56b When extracting mtrees, pass -i so schg/sappnd are respected.
This fixes /var/empty not being schg in the installation.

This was a change from fmtree to nmtree, that -i is now required to
apply these flags.

PR:		194189
Submitted by:	guyyur@gmail.com
MFC after:	2 weeks
Relnotes:	yes
2015-11-09 23:37:01 +00:00
Edward Tomasz Napierala
665aea9323 After r290196, the kernel won't wait for stuff like gmirror nodes
if they are not required for mounting rootfs.  However, it's possible
that some setups try to mount them in mountcritlocal (ie from fstab).

Export the list of current root mount holds using a new sysctl,
vfs.root_mount_hold, and make mountcritlocal retry if "mount -a" fails
and the list is not empty.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D3709
2015-10-30 15:52:10 +00:00
Devin Teske
75fe15ab68 Ignore per-mdN settings in mdconfig[2] startup
PR:		base/189696
Submitted by:	ganael.laplanche@martymac.org
MFC after:	3 days
X-MFC-to:	stable/10 stable/9
2015-10-29 21:12:57 +00:00
Dag-Erling Smørgrav
ded9988b76 Since r275359, there is no need to provide a bogus service name.
MFC after:	3 weeks
2015-10-26 15:16:27 +00:00
Poul-Henning Kamp
3fbbfad5d0 Allow osreldate and osrelease to be set per jail 2015-10-20 12:49:38 +00:00
Dag-Erling Smørgrav
eb860592bd After starting Unbound, wait for up to five seconds until unbound-control
indicates that it is up and running.

PR:		184047
MFC after:	3 weeks
2015-10-19 15:56:59 +00:00
Eric van Gyzen
b7359cb33c Fix indentation in etc/rc.d/fsck.
MFC after:	3 days
Sponsored by:	Dell Inc.
2015-10-12 14:23:10 +00:00
Bryan Drewery
10d8d828d3 When stopping ugidfw, it is not enough to just try unloading the module. If
the module is built-in to the kernel then the kldunload will fail.  Rather
than do this just check if there are rules and then remove them all.

Add requirement on FILESYSTEMS to ensure /usr is present for /usr/sbin/ugidfw
and /usr/bin/xargs.  This was already effectively the ordering from rcorder(8).

MFC after:	2 weeks
Relnotes:	yes
2015-09-29 18:51:56 +00:00
Edward Tomasz Napierala
53639aebb7 The "automount" rc script should depend on "automountd", not the other
way around.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-09-18 06:54:52 +00:00
Hiroki Sato
65e59735e7 Use read to parse a line instead of set.
MFC after:	3 days
2015-09-10 06:56:56 +00:00
Hiroki Sato
657bbe97c1 - Add uid check.
- Report delay<0 as a warning.

MFC after:	3 days
2015-09-10 06:55:28 +00:00
Hiroki Sato
900905fdef Update only static routes when an interface is specified. This fixed
a bad side-effect reported in PR 202144.

PR:		202144
MFC after:	3 days
2015-09-10 06:47:23 +00:00
Peter Wemm
336318a8fa Fix a conversion error in rc.d/jail 2015-08-27 20:52:41 +00:00
Gleb Smirnoff
7a79cebfba Replay r286410. Change KPI of how device drivers that provide wireless
connectivity interact with the net80211 stack.

Historical background: originally wireless devices created an interface,
just like Ethernet devices do. Name of an interface matched the name of
the driver that created. Later, wlan(4) layer was introduced, and the
wlanX interfaces become the actual interface, leaving original ones as
"a parent interface" of wlanX. Kernelwise, the KPI between net80211 layer
and a driver became a mix of methods that pass a pointer to struct ifnet
as identifier and methods that pass pointer to struct ieee80211com. From
user point of view, the parent interface just hangs on in the ifconfig
list, and user can't do anything useful with it.

Now, the struct ifnet goes away. The struct ieee80211com is the only
KPI between a device driver and net80211. Details:

- The struct ieee80211com is embedded into drivers softc.
- Packets are sent via new ic_transmit method, which is very much like
  the previous if_transmit.
- Bringing parent up/down is done via new ic_parent method, which notifies
  driver about any changes: number of wlan(4) interfaces, number of them
  in promisc or allmulti state.
- Device specific ioctls (if any) are received on new ic_ioctl method.
- Packets/errors accounting are done by the stack. In certain cases, when
  driver experiences errors and can not attribute them to any specific
  interface, driver updates ic_oerrors or ic_ierrors counters.

Details on interface configuration with new world order:
- A sequence of commands needed to bring up wireless DOESN"T change.
- /etc/rc.conf parameters DON'T change.
- List of devices that can be used to create wlan(4) interfaces is
  now provided by net.wlan.devices sysctl.

Most drivers in this change were converted by me, except of wpi(4),
that was done by Andriy Voskoboinyk. Big thanks to Kevin Lo for testing
changes to at least 8 drivers. Thanks to pluknet@, Oliver Hartmann,
Olivier Cochard, gjb@, mmoll@, op@ and lev@, who also participated in
testing.

Reviewed by:	adrian
Sponsored by:	Netflix
Sponsored by:	Nginx, Inc.
2015-08-27 08:56:39 +00:00
Mark Felder
af588fdff7 etc/rc.d/hostname: permit setting hostname if already set
Approved by:	dteske
Differential Revision:	https://reviews.freebsd.org/D2577
2015-08-12 16:22:10 +00:00
Adrian Chadd
86b6b0235b Finish reverting r286410 - sorry, I somehow missed this with svn commit. 2015-08-10 06:11:10 +00:00
Gleb Smirnoff
79d2c5e857 Change KPI of how device drivers that provide wireless connectivity interact
with the net80211 stack.

Historical background: originally wireless devices created an interface,
just like Ethernet devices do. Name of an interface matched the name of
the driver that created. Later, wlan(4) layer was introduced, and the
wlanX interfaces become the actual interface, leaving original ones as
"a parent interface" of wlanX. Kernelwise, the KPI between net80211 layer
and a driver became a mix of methods that pass a pointer to struct ifnet
as identifier and methods that pass pointer to struct ieee80211com. From
user point of view, the parent interface just hangs on in the ifconfig
list, and user can't do anything useful with it.

Now, the struct ifnet goes away. The struct ieee80211com is the only
KPI between a device driver and net80211. Details:

- The struct ieee80211com is embedded into drivers softc.
- Packets are sent via new ic_transmit method, which is very much like
  the previous if_transmit.
- Bringing parent up/down is done via new ic_parent method, which notifies
  driver about any changes: number of wlan(4) interfaces, number of them
  in promisc or allmulti state.
- Device specific ioctls (if any) are received on new ic_ioctl method.
- Packets/errors accounting are done by the stack. In certain cases, when
  driver experiences errors and can not attribute them to any specific
  interface, driver updates ic_oerrors or ic_ierrors counters.

Details on interface configuration with new world order:
- A sequence of commands needed to bring up wireless DOESN"T change.
- /etc/rc.conf parameters DON'T change.
- List of devices that can be used to create wlan(4) interfaces is
  now provided by net.wlan.devices sysctl.

Most drivers in this change were converted by me, except of wpi(4),
that was done by Andriy Voskoboinyk. Big thanks to Kevin Lo for testing
changes to at least 8 drivers. Thanks to Olivier Cochard, gjb@, mmoll@,
op@ and lev@, who also participated in testing. Details here:

https://wiki.freebsd.org/projects/ifnet/net80211

Still, drivers: ndis, wtap, mwl, ipw, bwn, wi, upgt, uath were not
tested. Changes to mwl, ipw, bwn, wi, upgt are trivial and chances
of problems are low. The wtap wasn't compilable even before this change.
But the ndis driver is complex, and it is likely to be broken with this
commit. Help with testing and debugging it is appreciated.

Differential Revision:	D2655, D2740
Sponsored by:	Nginx, Inc.
Sponsored by:	Netflix
2015-08-07 11:43:14 +00:00
Edward Tomasz Napierala
ebce46b2c6 Make rctl_enable rc variable actually work. To avoid breaking existing
setups that worked before, flip the default to "YES".  Most people don't
have /etc/rctl.conf, so they won't be affected in any way.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-08-05 17:38:02 +00:00
Mark Murray
4cbf30133e Address review.
Differential Revision: https://reviews.freebsd.org/D2924
2015-07-08 18:46:44 +00:00
Mark Murray
c4f9c760c9 Updated random(4) boot/shutdown scripting.
Fix the man pages as well.

Differential Revision: https://reviews.freebsd.org/D2924
Approved by: so (delphij)
2015-06-30 17:09:41 +00:00
Patrick Kelsey
821f1f1c9d Use correct flag in iovctl_start().
Differential Revision: https://reviews.freebsd.org/D2921
Reviewed by: rstone
Approved by: jmallett (mentor)
Sponsored by: Norse Corp, Inc.
2015-06-27 18:01:50 +00:00
Peter Wemm
e9de8580dc Adjust default argument construction for -c to be getopt compliant for
consistency, even though unbound understood it.
2015-05-22 21:33:13 +00:00
Enji Cooper
7afb8adff3 Move all test integration pieces for etc/ from etc/ to tests/
This is being done to fix breakage with make distribution with read-only
source trees as make distribution doesn't use make obj like building
tests/ does in all cases

Reported by: Wolfgang Zenker <wolfgang@lyxys.ka.sub.org>
Suggested by: jhb
X-MFC with: r282059
MFC after: 1 week
2015-05-18 11:02:43 +00:00
Xin LI
1d79f30229 Revert r282672.
tr is in /usr and not available at the time hostid is run (must be run
before FILESYSTEMS).

Reported by:	def
2015-05-11 00:16:32 +00:00
Xin LI
2547b459b0 Always convert uuid to lower case.
MFC after:	2 weeks
2015-05-08 23:36:31 +00:00
Gleb Smirnoff
361fffd228 Require "ldconfig" for "devd". It is possible that user puts into
devd.conf execution of third-party software, that needs libraries
from /usr/local. Since devd is launched before ldconfig script, if
the hardware that has associated software is attached on boot, then
execution would fail.

Differential Revision:	https://reviews.freebsd.org/D2332
Reviewed by:		imp
2015-04-28 13:13:23 +00:00
Xin LI
3f6cf39fb2 Generate new UUID if system UUID is known bad or malformed and add a two
seconds sleep if we found the system UUID be invalid.

Obtained from:	FreeNAS
MFC after:	2 weeks
2015-04-27 20:21:56 +00:00
Enji Cooper
61f63dbbb1 Move etc/tests/rc.d to etc/rc.d/tests to match the directory layout jmmv@
documented and implemented in other areas of the FreeBSD tree

MFC after: 1 week
2015-04-27 07:00:34 +00:00
Edward Tomasz Napierala
4e25c86f4c Remove some oldnfs remnants.
Differential Revision:	https://reviews.freebsd.org/D2287
Reviewed by:	rmacklem@
Sponsored by:	The FreeBSD Foundation
2015-04-18 16:08:06 +00:00
Xin LI
8f990792fc Verify if the saved hostid is still the same and update if
it was changed.

Sponsored by:	iXsystems, Inc.
Obtained from:	FreeNAS (trueos commit 0abb740)
2015-04-15 21:48:06 +00:00
Josh Paetzel
fe56ff1ccc Typo fix in comment
MFC after:	3 days
2015-04-06 19:23:45 +00:00
Josh Paetzel
120e0283fc Bug fixes and feature adds
- Remove extranious echo that breaks puppet
- Handle restarts of multiple pflog devices correctly
- Add the ability to perform actions on specific pflog devices.

PR:	199150
Submitted by:	jason.unovitch@gmail.com
MFC after:	3 days
2015-04-05 17:09:58 +00:00
Ryan Stone
6888132b53 Add an rc.d script to invoke iovctl(8) during boot
Differential Revision:		https://reviews.freebsd.org/D88
Reviewed by:			wblock, emaste, allanjude
MFC after:			1 month
Relnotes:			yes
Sponsored by:			Sandvine Inc.
2015-03-01 00:58:23 +00:00
Enji Cooper
fb61cc1e64 Unbreak rcorder when MK_UTX == no by moving utx from REQUIRE: in LOGIN to
BEFORE: in utx

MFC after: 1 week
2015-02-13 20:52:23 +00:00
Enji Cooper
f413242b51 Unbreak rcorder when MK_UNBOUND == no by moving local_unbound from REQUIRE:
in NETWORKING to BEFORE: in the script

MFC after: 2 weeks
2015-02-13 20:49:43 +00:00
Roger Pau Monné
d91f92d285 rc.d: load the network config file for netif
r272959 broke compatibility with mfsBSD that stores the default network
config file in /etc/rc.conf.d/network. In order to fix that load the network
config file from netif also.
2015-02-10 13:07:08 +00:00
Jamie Gritton
0639437b99 Un-revert the r278323 again - whatever Jenkins/kyua is up it, it has
nothing to do with this.
2015-02-10 00:48:51 +00:00
Enji Cooper
66ea550a77 Remove explicit routing/sendmail rc.d inclusion in FILES
Reported by: Guy Yur <guyyur@gmail.com>
MFC after: 14 days
X-MFC with: r278249
Sponsored by: EMC / Isilon Storage Division
2015-02-09 17:53:16 +00:00
Jamie Gritton
3f920f3f44 Revert the rc part of r278323 until I can figure out what Jenkins is doing. 2015-02-07 05:02:10 +00:00
Jamie Gritton
07a7869fb2 Add mount.procfs jail parameter, so procfs can be mounted when a prison's
root is in its fstab.

Also fix a typo while I'm at it.

PR:		197237 197066
MFC after:	3 days
2015-02-06 17:54:53 +00:00
Rui Paulo
a23f83b922 Don't add static IPv6 routes when to all FIBs when net.add_addr_allfibs is 0.
This avoids a bunch of boot time warnings when rc.d/routing runs.

MFC after:	1 week
2015-02-06 00:02:00 +00:00
Enji Cooper
5e79550fd0 Use FILES+= idiom instead of _inetd when referencing inetd rc.d script
This was a discrepancy between ^/projects/building-blocks and ^/head that I
didn't resolve before committing the change to ^/head

Pointyhat to: me
Reported by: jhb
MFC after: 20 days
X-MFC with: r278249
Sponsored by: EMC / Isilon Storage Division
2015-02-05 20:45:50 +00:00
Enji Cooper
ed1ffc3b4b Honor the following flags with the following rc.d scripts for services that can
be easily decoupled from the boot process without disrupting other services

- MK_APM && MK_ACPI: powerd
- MK_BOOTPARAMD: bootparams
- MK_FTP: ftpd
- MK_INETD: inetd
- MK_LEGACY_CONSOLE: moused, syscons
- MK_MAIL: othermta
- MK_NS_CACHING: nscd
- MK_NTP: ntpd (ntpdate is required by other services and can't be easily
                conditionalized -- yet..)
- MK_ROUTED: routed
- MK_SENDMAIL: sendmail
- MK_TIMED: timed
- MK_VI: virecover

MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division
2015-02-05 11:38:29 +00:00
Enji Cooper
97f1b5265c Remove hostapd and wpa_supplicant from FILES so they're installed conditionally
if MK_WIRELESS != no

MFC after: 3 days
X-MFC with: r277740
2015-02-02 05:41:17 +00:00
Cy Schubert
e946956c6c ipfilter 5.1.2 (vs 4.1.28 in previous releases of FreeBSD) stores IPv4
and IPv6 rules in a single table. ipf -6 -Fa will flush the whole table,
including IPv4 rules. This patch removes the redundant ipf -I -6 -Fa
statement.

PR:		188318
MFC after:	2 weeks
2015-01-28 21:01:55 +00:00
Enji Cooper
7fdb2b7a8d Respect MK_KERBEROS with etc/rc.d/ipropd_master and etc/rc.d/ipropd_slave
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-01-26 09:51:21 +00:00
Enji Cooper
a841418dd6 Honor MK_WIRELESS with etc/rc.d/hostapd and etc/rc.d/wpa_supplicant
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-01-26 09:43:08 +00:00
Enji Cooper
62a1797fb4 Honor MK_JAIL with etc/rc.d/jail
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-01-26 09:37:14 +00:00
Enji Cooper
6c5f4450a3 Honor MK_ACCT with etc/rc.d/accounting
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-01-26 08:46:26 +00:00
Enji Cooper
a3b648d3bd Remove explicit inclusion of lpd from FILES
X-MFC with: 277731
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-01-26 08:30:24 +00:00