Commit Graph

848 Commits

Author SHA1 Message Date
Doug Barton
aa5affaf3b Brooks pointed out a potential problem with disabling the X cleaning
by default, so add a new knob that is on by default, and check that
knob in start_precmd so that it can run even if cleaning /tmp is
not enabled. This has the advantage of not violating POLA, while
still allowing the user to disable this behavior if they wish (for
example on a server that will never run X).
2005-12-20 20:36:48 +00:00
Doug Barton
ea871df08c Clear up problems with /etc/rc.d/{abi|cleanvar|cleartmp} brought
to light by the PR.  Specifically, convert these three scripts
into good rc.d citizens, making sure that their functionality
is preserved, but the rc.d framework rules are not broken.

Add support for cleanvar as a regular rc.d script in the
default rc.conf, and document this in the man page.

Add a descriptive comment to rc.conf that regarding the
three emulation/compatibility services provided by abi
so users will not be confused by these services not having
their own startup scripts.

PR:		conf/84574
Submitted by:	Alexander Botero-Lowry
2005-12-19 10:57:00 +00:00
Ian Dowse
2e46a159cc Remove usbd(8) and all references to it. It is no longer necessary
since devd(8) now provides the same functionality.

Submitted by:	Anish Mistry
2005-12-15 01:04:51 +00:00
Doug Barton
57e561c083 Remove rcconf.sh from /etc/rc.d, and instead load the configuration
as part of rc. Doing this, and the sourcing of rc.subr after we have
determined if we are booting diskless (and correspondingly run
rc.initdiskless if necessary) are safe, and actually allow fewer files
to be needed on the diskless box. This also allows variables from
the configuration to be available to rc itself, such as ...

Add a variable to rc.conf, early_late_divider, which designates the
script which separates the early and late stages of the boot process.
Default this to mountcritlocal, and add text to etc/defaults/rc.conf,
rc.conf(5) and diskless(8) which describes how and why one might want
to change this.

Reviewed by:	brooks
2005-12-10 20:21:46 +00:00
Ruslan Ermilov
02c29dd14d Files are installed with mode 444 by default. 2005-12-09 15:19:31 +00:00
Joseph Koshy
8334958a7f Add a -f configfile option to devd(8), based on a patch submitted by
Wojciech A. Koszek.

Submitted by:	Wojciech A. Koszek <dunstan@freebsd.czest.pl>
2005-11-24 14:39:41 +00:00
Maksim Yevmenkin
e08872c40b Revise hcsecd(8) and sdpd(8) rc.d scripts one more time
- Use _prestart rc.d method to automatically kldload ng_btsocket(4) if needed;

- Rename "sdpd_user" to "sdpd_username" and "sdpd_group" to "sdpd_groupname"
  to avoid collision with "magic" variables;

Inspired by:	yar
MFC after:	3 days
2005-11-22 18:51:43 +00:00
Brooks Davis
cda39c0193 Add a new configuration variable, ipv4_addrs_<ifn>, which adds one or
more IPv4 address from a ranged list in CIRD notation:

ipv4_addrs_ed0="192.168.0.1/24 192.168.1.1-5/28"

In the process move alias processing into new ipv4_up/down functions to
more toward a less IPv4 centric world.

Submitted by:	Philipp Wuensche <cryx dash freebsd at h3q dot com>
2005-11-14 23:34:50 +00:00
Maksim Yevmenkin
cdf98ad3e7 Start integrating Bluetooth into rc.d system.
Introduce /etc/rc.d/bluetooth script to start/stop Bluetooth devices. It
will be called from devd(8) in response to device arrival/departure events.
It is also possible to call it by hand to start/stop particular device
without unplugging it.

Introduce generic way to set configuration parameters for Bluetooth devices.
By default /etc/rc.d/bluetooth script has hardwired defaults compatible
with old rc.bluetooth from /usr/share/netgraph/bluetooth/examples. These
can be overridden using /etc/defaults/bluetooth.device.conf file (system
wide defaults). Finally, there could be another device specific override
file located in /etc/bluetooth/$device.conf (where $device is ubt0, btccc0
etc.)

The list of configuration parameters and their meaning described in the
/etc/defaults/bluetooth.device.conf file. Even though Bluetooth device
configuration files are not shell scripts, they must follow basic sh(1) syntax.

The bluetooth.device.conf(5) and handbook update will follow shortly.

Inspired by:	Panagiotis Astithas ( past at ebs dot gr )
Reviewed by:	brooks, yar
MFC after:	1 week
2005-11-10 19:09:22 +00:00
Maksim Yevmenkin
412d0f16d1 Add rc.d scripts for the hcsecd(8) and sdpd(8) daemons. Put defaults into
/etc/defaults/rc.conf. Both daemons can run even if no Bluetooth devices
are attached to the system. Both daemons depend on Bluetooth socket layer
and thus disabled by default. Bluetooth sockets layer must be either loaded
as a module or compiled into kernel before the daemons can run.

MFC after:	1 month
2005-10-11 19:16:48 +00:00
Yaroslav Tykhiy
c8a0dfab83 Add an rc.d script to start pfsync at the right moment of the
system boot, and hook it up in the system.

The separate script is needed because in the presence of various
interface lists in rc.conf ($network_interfaces, $cloned_interfaces,
$sppp_interfaces, $gif_interfaces, more to come) it is hard to start
them orderly, so that pfsync is brought up after its syncdev, which
is required for the proper startup of pfsync.

Discussed with:	mlaier on -pf
MFC after:	5 days
2005-10-02 18:59:02 +00:00
Robert Watson
1a51e01115 Add a new rc.conf entry, kerberos5_server_flags, which allows the
administrator to specify additional start-up flags to the Kerberos
5 Authentication Server.

MFC after:	3 days
2005-09-20 11:13:28 +00:00
Yaroslav Tykhiy
4986c6d8e2 Stop hard-coding an -M flag to mdmfs(8) in /etc/rc.subr.
Now this flag can be set, or not set, for memory-backed
file systems on individual basis, as illustrated by the
rc.conf(5) variables tmpmfs_flags and varmfs_flags.  The
flag is set for those FS'en by default, in /etc/defaults/rc.conf,
in order to stay compatible with the old rc.subr behaviour.

Submitted by:	marck
MFC after:	3 days
2005-08-24 16:25:47 +00:00
Brooks Davis
41f7ee42ae - Remove the removable_interfaces variable. /etc/pccard_ether will
now run on any interface.
- Add a new ifconfig_<ifn> keyword, NOAUTO which prevents configuration
  of an interface at boot or via /etc/pccard_ether.  This allows
  /etc/rc.d/netif to be used to start and stop an interface on a purely
  manual basis.  The decision to affect pccard_ether may be revisited at
  a later date.

Requested by:	imp, gallatin (removable_interfaces)
Discussed with:	sam, Randy Bush (NOAUTO)
2005-08-24 01:23:49 +00:00
Pawel Jakub Dawidek
b12cfed25c Add scripts for GELI device configuration on boot.
rc.d/geli - configures encryption (ask for passphrases, etc.);
rc.d/geli2 - is called after file systems are mounted and mark devices for
             detach on last close.

Sponsored by:	Wheel Sp. z o.o.
		http://www.wheel.pl
MFC after:	3 days
2005-08-14 18:02:22 +00:00
Pawel Jakub Dawidek
49ad116fcc Teach rc.d/encswap script how to use geli(8) for swap encryption.
MFC after:	3 days
2005-08-05 23:38:51 +00:00
Pawel Jakub Dawidek
39f1497151 Remove gbde_swap_enable option which doesn't work and doesn't really have to
work, as one still needs to put <device>.bde into /etc/fstab.
2005-08-04 08:19:13 +00:00
David E. O'Brien
e8e92a219f Minor comment re-alignment. 2005-07-22 00:38:55 +00:00
Pav Lucistnik
0da71daba6 - Mention special behaviour of init(8) when kern_securelevel="0"
Suggested by:	Miroslav Lachman <000.fbsd@quip.cz>
Approved by:	cperciva (src hat)
2005-07-21 15:17:54 +00:00
Pawel Jakub Dawidek
7db9a6fcd1 Introduce new per-jail variable jail_<name>_flags, which allows to specify
jail(8) flags (before the change we had hardcoded "-l -U root").

Submitted by:	Frank Behrens <frank@pinky.sax.de>
PR:		conf/80244
Approved by:	re (scottl)
MFC after:	1 week
2005-06-26 16:30:20 +00:00
Brooks Davis
1e03bb0312 Remove default and documenation for pccard_ether_delay since I removed
it from /etc/pccard_ether.

Submitted by:	Jeremie Le Hen <jeremie at le-hen dot org>
2005-06-08 00:05:58 +00:00
Dag-Erling Smørgrav
cad530b9d3 Change the default for dumpdev to "AUTO". It should be reverted to "NO"
on RELENG_* branches.
2005-06-07 15:22:08 +00:00
Brooks Davis
8e9e71f817 Support code for the OpenBSD dhclient. This significantly changes the
way interfaces are configured.  Some key points:

  - At startup, all interfaces are configured through /etc/rc.d/netif.
  - ifconfig_<if> variables my now mix real ifconfig commands the with
    DHCP and WPA directives.  For example, this allows media
    configuration prior to running dhclient.
  - /etc/rc.d/dhclient is not run at startup except by netif to start
    dhclient on specific interfaces.
  - /etc/pccard_ether calls "/etc/rc.d/netif start <if>" to do most of
    it's work.
  - /etc/pccard_ether no longer takes additional arguments to pass to
    ifconfig.  Instead, ifconfig_<if> variables are now honored in favor
    of pccard_ifconfig when available.
  - /etc/pccard_ether will only run on interfaces specified in
    removable_interfaces, even if pccard_ifconfig is set.
2005-06-07 04:49:12 +00:00
Gleb Smirnoff
8d6e44f80f Add startup script and default configuration file for bsnmpd.
Reviewed by:	harti
2005-04-17 10:47:58 +00:00
Thomas Quinot
a5562a139a Document that dumpdev may be set to AUTO to dump to the first appropriate
swap device listed in /etc/fstab.
2005-04-12 15:21:51 +00:00
Doug Barton
f297a20e30 The alternative suggested for /entropy as a shutdown
save file was /var/db/entropy, which also happens to
be the directory where the individual entropy files
created by /usr/libexec/save-entropy are stored.
Change the suggestion to be /var/db/entropy-file
instead.

In an error condition where the shutdown file is not
created, the error message accessed a variable that
doesn't exist.

PR:		conf/75722
Submitted by:	Nicolas Rachinsky <list@rachinsky.de>
2005-04-11 02:45:05 +00:00
Nate Lawson
0a133d67f3 Set CPU speed to 100% in acpi_throttle attach. This is needed for some
systems that boot with this value at the lowest setting.  Change the
default boot config back to "leave frequency as BIOS set it".  Also, fix
buglet where acpi_throttle wouldn't be used if p4tcc was present but
disabled by the user.

MFC after:	1 week
2005-04-10 20:04:30 +00:00
Nate Lawson
c2137e57f5 Instead of leaving the current frequency setting at whatever the BIOS set
on boot, force it to HIGH.  This is needed for some systems which appear
to boot with a low acpi_throttle setting by default.  Thanks to Christian
Brueffer for tracking this down on his system.

MFC after:	1 day
2005-04-03 21:45:20 +00:00
Tom Rhodes
a7efb70ebd Remove mac_lomac(4) functionality. The proper way is to use loader.conf
or build the policy into a kernel.

Approved by:	rwatson
2005-03-12 21:09:15 +00:00
Brooks Davis
c1c1542199 Allow chkprintcap(8) to be run before lpd is started. Disabled by
default for now.  Default flags create missing directories.

Remove comment about doing this in etc/rc.d/var.

Unlike in the PR, I chose to do this in the lpd script where we reliably
have /usr available.

PR:		conf/71488
Submitted by:	RZ-FreeBSD0904 at fh-karlsruhe dot de
2005-03-02 02:46:47 +00:00
Brooks Davis
bb4bd97c12 - Update etc/rc.d/newsyslog to FreeBSD standards and install it.
- Enable it by default, running newsyslog with -CN which creates files
   that have the C flag specified in /etc/newsyslog.conf.
 - Remove the "newsyslog -CC" call from etc/rc.d/var and the check for
   newsyslog.
 - Add the C flag to entries in /etc/newsyslog.conf that are currently
   installed as part of the base system.

There are two effects from this change:
 - Users who delete default syslog files to stop logging to them
   will need to set newsyslog_enable=NO in rc.conf or remove the C
   flag from those file in /etc/newsyslog.conf or they will come back
   on the next boot.
 - Diskless systems now create the same set of files that ordinary
   systems have by default instead of every file in newsyslog.conf.
2005-03-02 00:40:55 +00:00
Nate Lawson
570453011e Due to a couple complaints about C3 failing on an old Compaq Armada and
a mobile Celeron, disable it by default for the release.  We'll have to
nail the last few cases later.
2005-02-27 04:05:50 +00:00
Nate Lawson
511105017d Add rc.conf options for powerd (disabled by default) and hook the script
up to the build.
2005-02-26 21:19:35 +00:00
Nate Lawson
7cdc285a81 Make power_profile not touch cpufreq by default. 2005-02-26 21:01:22 +00:00
Nate Lawson
7b708ac75b Add support for cpufreq to power_profile(8). Values for on/offline cpu
frequencies are specified with performance_cpu_freq and economy_cpu_freq.
Of course, special values LOW and HIGH are also supported.  Also, remove
old throttling support.
2005-02-06 21:12:25 +00:00
Giorgos Keramidas
73717ac382 Add a reference to the periodic.conf(5) manual page.
Suggested by:	simon
2005-01-24 22:21:13 +00:00
Giorgos Keramidas
ac7be2ddeb Add a reference to rc.conf(5).
PR:		docs/35648
Submitted by:	Gary W. Swearingen
2005-01-24 21:52:32 +00:00
Warner Losh
2f145ae9d1 Another prism2 card (not sure what, if anything, is needed for >=5)
Pr: 43805
2005-01-11 00:40:00 +00:00
Paul Richards
a97346b68c Ports index file is now INDEX-6 2005-01-04 16:35:30 +00:00
Ruslan Ermilov
e653b48c80 Start the dreaded NOFOO -> NO_FOO conversion.
OK'ed by:	core
2004-12-21 08:47:35 +00:00
Brian Somers
f6370f2735 Use rc.subr
PR:		72505
Submitted by:	Amir Shalem <amir@active.ath.cx>
2004-12-15 12:39:28 +00:00
Ralf S. Engelschall
62bb1d78fe Improve the RC framework for the clean booting/shutdown of Jails:
1. Feature: for flexibility reasons and as a prerequisite to clean
   shutdowns, allow the configuration of a stop/shutdown command
   via rc.conf variable "jail_<name>_exec_stop" in addition to the
   start/boot command (rc.conf variable "jail_<name>_exec_start"). For
   backward compatibility reasons, rc.conf variable "jail_<name>_exec"
   is still supported, too.

2. Debug: Add the used boot/shutdown commands to the debug output of
   the /etc/rc.d/jail script, too.

3. Security: Run the Jail start/boot command in a cleaned environment
   to not leak information from the host to the Jail during startup.

4. Feature: Run the Jail stop/shutdown command "jail_<name>_exec_stop" on
   "/etc/rc.d/jail stop <name>" to allow a graceful shutdown of the Jail
   before its processes are just killed.

5. Bugfix: When killing the remaining Jail processes give the processes
   time to actually perform their termination sequence. Without this the
   subsequent umount(8) operations usually fail because the resources
   are still in use. Additionally, if after trying to TERM-inate the
   processes there are still processes hanging around, finally just KILL
   them.

6. Bugfix: In rc.shutdown, if running inside a Jail, skip the /etc/rc.d/*
   scripts which are flagged with the KEYWORD "nojail" to allow the
   correct operation of rc.shutdown under jail_<name>_exec_stop="/bin/sh
   /etc/rc.shutdown". This is analogous to what /etc/rc does inside a Jail.

Now the following typical host-configuration for two Jails works as
expected and correctly boots and shutdowns the Jails:

-----------------------------------------------------------
#  /etc/rc.conf:
jail_enable="YES"
jail_list="foo bar"
jail_foo_rootdir="/j/foo"
jail_foo_hostname="foo.example.com"
jail_foo_ip="192.168.0.1"
jail_foo_devfs_enable="YES"
jail_foo_mount_enable="YES"
jail_foo_exec_start="/bin/sh /etc/rc"
jail_foo_exec_stop="/bin/sh /etc/rc.shutdown"
jail_bar_rootdir="/j/bar"
jail_bar_hostname="bar.example.com"
jail_bar_ip="192.168.0.2"
jail_bar_devfs_enable="YES"
jail_bar_mount_enable="YES"
jail_bar_exec_start="/path/to/kjailer -v"
jail_bar_exec_stop="/bin/sh -c 'killall kjailer && sleep 60'"
-----------------------------------------------------------
#  /etc/fstab.foo
/v/foo /j/foo/v/foo nullfs rw 0 0
-----------------------------------------------------------
#  /etc/fstab.bar
/v/bar /j/bar/v/bar nullfs rw 0 0
-----------------------------------------------------------

Reviewed by:	freebsd-hackers
MFC after:	2 weeks
2004-12-14 14:36:35 +00:00
Scott Mitchell
98a3c37bd8 Add Ethernet part of Intel EtherExpress PRO/100 LAN/Modem card. This is a
rebadged Xircom REM56 RealPort card.  Short MFC timeout to beat the 4.11
code freeze.

PR:		53027
Submitted by:	John Merryweather Cooper <coop9211 at uidaho dot edu>
Approved by:	imp (mentor)
MFC after:	2 days
2004-12-09 22:27:11 +00:00
Jim Rees
d4eb51a87a Add nfs4 to list of net filesystems.
Approved by:	alfred
2004-12-01 22:05:50 +00:00
Max Laier
66754ab3f1 Teach periodic(8) security output to display information about blocked
packet counts by pf(4).

This adds a ``daily_status_security_pfdenied_enable'' variable to
periodic.conf, which defaults to ``YES'' as the matching IPF(W) versions.

The output will look like this (line wrapped):

  pf denied packets:
  > block drop log on rl0 proto tcp all [ Evaluations: 504986 Packets: 0
    Bytes: 0 States: 0 ]
  > block drop log on rl0 all [ Evaluations: 18559 Packets: 427 Bytes: 140578
    States: 0 ]

Submitted by:	clive (thanks a lot!)
MFC after:	2 weeks
2004-11-24 18:41:53 +00:00
Maxime Henrion
d4d8b79704 Implement per-jail fstab(5) files. Here's a rc.conf sample using
this feature for a jail named foo :

jail_foo_mount_enable="YES"
jail_foo_fstab="/etc/fstab.foo"

The second line is actually useless, since the code defaults to
using "/etc/fstab.$jailname" as the fstab file if none is specified.

MFC after:	3 days
Submitted by:	Jeremie Le Hen <jeremie@le-hen.org>
2004-11-23 20:09:58 +00:00
Giorgos Keramidas
16c2bf8bfb Revert the noexec,nosuid,nodev options for md /tmp file systems, since
the change in the default behavior may break existing, working setups.

Requested by:	brooks
2004-11-09 21:33:19 +00:00
Giorgos Keramidas
8cfaa2f1f1 Add two new rc.conf options: tmpmfs_flags and varmfs_flags.
These can be used to pass extra options to the mdmfs(8) utility,
to customize the finer details of the md file system creation
(i.e. to turn on/off softupdates, to specify a default owner for md
filesystem, etc).

Use these two new flags to mount tmpmfs and varmfs without
softupdates, since it doesn't make much sense to use SU on
malloc-backed file systems.

Reviewed by:	mtm
Inspired by:	J. D. Bronson, jbronson at wixb dot com
2004-11-09 10:03:17 +00:00
Warner Losh
be9a7a2249 Someone (sanpei-san?) sent me this entry some time ago. Add COREGA
FEtherII PCC-TXD to the FEther PCC-TXD entry (since they appear to be
handled the same).
2004-11-08 16:59:01 +00:00
Ruslan Ermilov
371e19faf6 Sync up with vinum(8) and rc.d/vinum removal.
OK'ed by:	phk
2004-11-04 13:33:29 +00:00
Mike Makonnen
86bade2751 Do a better job of supporting more than one mouse device
on the system.

To start/stop/check on a specific device give the device name as
the second argument to the script:
	# /etc/rc.d/moused start ums0

To use different rc.conf(5) knobs with different mice use the device
name as part of the knob. For example, if the mouse device is ums0, then:
	moused_ums0_enable=yes
	moused_ums0_flags="-z 4"
	moused_ums0_port="/dev/ums0"

Starting rc.d/moused without the device argument will use the standard
moused_* flags. So, this commit should not disrupt or change current usage.

To preserve current behaviour with respect to usb mice, which appear
automatically when inserted, there is a new knob, moused_nondefault_enable,
which will treat any devices without rc.conf knobs as enabled.

To minimize knobs in /etc/rc.conf, the device file and pid file are
auto-computed, so that in the typical case for a usb mouse you don't
need to add anything extra in /etc/rc.conf to get it working.

Additionally, this updates /etc/usbd.conf to use the rc.d/moused script so
people don't have to modify it to configure their usb mouse anymore.

MFC after: 1 month
2004-11-01 18:05:41 +00:00
Pawel Jakub Dawidek
1f8197cf4d Allow to change interfaces name on boot time.
Now, one should be able to put something like this into /etc/rc.conf:

	ifconfig_fxp0_name="net0"
	ifconfig_net0="inet 10.0.0.1/16"

Reviewed by:	green
2004-10-30 13:44:06 +00:00
Ruslan Ermilov
a35d88931c For variables that are only checked with defined(), don't provide
any fake value.
2004-10-24 15:33:08 +00:00
Giorgos Keramidas
6e1b2264bd Introduce root_rw_mount as a new variable in defaults/rc.conf to
unbreak /etc/rc.d/root for diskless systems that get their root
filesystem from a read-only NFS mount.

PR:		conf/72927
Submitted by:	Ralf Wenk <RZ-FreeBSD1004@fh-karlsruhe.de>
Reviewed by:	brooks
2004-10-20 16:58:28 +00:00
Ruslan Ermilov
a21137f7ad Accidentally removed the last component of the pathname when committing. 2004-10-13 07:12:14 +00:00
Ruslan Ermilov
b8c7ee4701 Fix a botched rev. 1.221 commit. Also, a number of people have
pointed out that /usr/local/etc/rc.d/000.pkgtools.sh installed
with the portupgrade does an equivalent thing, so I personally
would like to see the change reverted, but let David handle it.
2004-10-13 07:00:21 +00:00
Dag-Erling Smørgrav
b63c18f291 Remove hcsecd line which was inadvertantly included in the previous commit. 2004-10-12 18:45:15 +00:00
Dag-Erling Smørgrav
1ffa2a0a7c Remove a pointless syslogd_flags example.
MFC after:	2 weeks
2004-10-12 18:36:32 +00:00
David E. O'Brien
5d79fb92c2 'portupgrade' places obsoleted shared libraries in /usr/local/lib/compat/pkg,
so add this the list of directories ldconfig'ed.
2004-10-11 22:37:34 +00:00
Tom Rhodes
cd22091d46 Correct a trivial typo. 2004-09-29 07:07:43 +00:00
Tom Rhodes
b507bda539 Give users the ability to load a mac_bsdextended(4) ruleset on boot (defaults
to NO of course).  Provide a basic ruleset file, rc.bsdextended, but allow
the filename to be overridden through rc.conf.

Discussed with:	rwatson (awhile ago)
2004-09-29 00:12:28 +00:00
Doug Barton
8f1bb3891d Create a named chroot directory structure in /var/named, and use it
by default when named is enabled. Also, improve our default directory
layout by creating /var/named/etc/namedb/{master|slave} directories,
and use the former for the generated localhost* files.

Rather than using pax to copy device entries, mount devfs in the
chroot directory.

There may be some corner cases where things need to be adjusted,
but overall this structure has been well tested on a production
network, and should serve the needs of the vast majority of users.

UPDATING has instructions on how to do the conversion for those
with existing configurations.
2004-09-28 09:46:00 +00:00
Doug Barton
511c05b377 For the default FreeBSD install, the file path actually is
/var/run/named/pid. This is done so that named can start
with -u bind and still dump a pid file in that directory,
which is chowned to user bind.
2004-09-24 22:47:10 +00:00
Dag-Erling Smørgrav
8540155e95 It's named.pid, not named/pid.
Pointy hat to:	dougb@
2004-09-24 19:46:18 +00:00
Doug Barton
7295f657e2 Add a note to indicate that the path set in named_pidfile must
also be set in named.conf. Our default named.conf has this already.

Update the note for named_symlink_enable to indicate that ndc is gone.
2004-09-24 04:45:16 +00:00
Joseph Koshy
59583bf53c Add a knob 'daily_status_security_diff_flags' controlling the
format of the 'diff' output generated during periodic(8) scripts.

Submitted by:	keramida (script changes)
Reviewed by:	keramida (man page changes)
2004-09-23 02:00:52 +00:00
Sean Chittenden
6e03664cc4 Bring back etc/rc.d/ntpdate as requested by scads of people. This isn't a
complete backout as the ntpd_sync_on_start etc/rc.conf tunable is still
present, though the default is now NO (was YES).  Since we're no longer
syncing time at startup by default when ntpd is enabled (as was the case
24hrs ago), remove UPDATING entry pointing out that ntpd(1) -g is slower
than ntpdate(1).

Hopefully ntpd_sync_on_start="YES" can be made the default for -CURRENT
after 5.3 is cut.  At the very least, this should be set to YES when a
user requests to have ntpd enabled via sysinstall(1).

Requested by:	many
2004-09-15 01:08:33 +00:00
Sean Chittenden
0050f9ec3c Stop using ntpdate(1) in our startup proceedure. Replace ntpdate(1) with
calls to ntpd -g.  ntpd is noticably slower than ntpdate, but is also more
accurate.  This removes the nasty hackery in rc.d/ntpdate that would parse
out ntp servers from /etc/ntp.conf (ntpd knows how to read its own config
file).  By default, ntpd *will* sync with its listed time servers.  To
turn this off so that ntpd does not sync, ntpd_sync_on_start="NO" can be
added to /etc/rc.conf.  If ntpd is not enabled (the default), then time is
not synced on startup.  ntpdate's use has been depreciated by the ntpd
authors for quite some time so this change shouldn't be unexpected.

Suggested by:	des
Approved by:	roberto (resident ntp guru)
2004-09-14 03:01:38 +00:00
Max Laier
a31f99f887 Fix typo in description of pflog_logfile.
Submitted by:	Mike Jakubik
2004-07-27 00:28:16 +00:00
Simon L. B. Nielsen
64785dbd46 For the gbde attach script:
- Ask the user up to X times (3 by default) for the pass-phrase, if
  it is incorrect the first time.
- Add support for storing the lockfiles in another other directory
  than /etc.
- Document that it is possible to override the location of each single
  lockfile.

Approved by:	pjd
2004-07-18 18:01:48 +00:00
Warner Losh
d8dbb9937b devd is now on by default
Reviewed by: dfr,njr (not nate!)
2004-06-30 15:58:46 +00:00
Brian Feldman
d5ed4f061e Allow setting the system console keyboard via the ${keyboard} rc.conf
directive.
2004-06-18 20:09:30 +00:00
Jens Schweikhardt
d8beb0fd3b Removed whitespace at BOF, EOL & EOF. 2004-06-06 11:46:29 +00:00
MIHIRA Sanpei Yoshiro
ce62a94c13 fix MELCO LPC3-TX entry.
I mistaked at 1.166.

Submitted by:	SARUMARU Yoshihiko <mistral@imasy.or.jp>
Pointed out by:	MORIYASU Hirano <m-hirano@konsei.co.jp>
	FreeBSD-users-jp 79808
	FreeBSD-users-jp 79816
2004-06-05 06:11:54 +00:00
Hajimu UMEMOTO
389faa192d fix typo in comment in my previous commit. 2004-06-02 09:58:18 +00:00
Hajimu UMEMOTO
b351b78a10 Add ip6addrctl_enable and ip6_addrctl_verbose option. If
ip6addrctl_enable is set to YES, address selection policy is installed
into kernel.
If there is /etc/ip6addrctl.conf, it is used for address selection
policy.  Even if there is no /etc/ip6addrctl.conf, we install default
policy.  In this case, if ipv6_enable is set to YES, we use address
selection policy described in RFC 3484 as default.  Otherwise, we
install priority policy for IPv4 address.
The default of ip6addrctl_enable is NO for now.  However, it may
better to enable it by default.
2004-06-02 09:39:49 +00:00
Nate Lawson
e6228fcfdc Throw the switch and enable use of the lowest idle states while online in
addition to offline.  This can be overridden in /etc/rc.conf if it causes
trouble although this has been stable since 2003/12.
2004-05-29 04:52:37 +00:00
Josef Karthauser
bb1e7a5e19 Allow the location of the INDEX file to specified to pkg_version.
This is particularly convenient on a cluster of machines to prevent
having to rebuild the INDEX file on each.

Reviewed by:	portmgr
2004-05-19 09:18:08 +00:00
Darren Reed
167992ad9a Add script for checking ipv6 blocked packets from PR.
PR:		misc/50154
Submitted by:	Kimura Fuyuki <fuyuki@hadaly.org>
2004-04-20 13:44:57 +00:00
Brian Feldman
87bd2f457b Document devfs_set_rulesets a little. 2004-04-10 22:13:27 +00:00
Scott Mitchell
24c8ae76c2 Add Xircom XEM5600 card (appears to be a renamed REM56).
Observe that Xircom CEM28 and CEM33 are known to work in Ethernet mode.

Reviewed by:	imp (mentor)
2004-04-09 17:15:18 +00:00
Max Khon
934c5da9c4 Document sendmail_pidfile variable.
Add sendmail_procname variable.
2004-04-05 16:22:14 +00:00
Max Laier
6cd9ebedd7 Add rc.d script to start pflogd and add rcvars etc. Also document vars in
rc.conf(5) and put a sample entry to newsyslog.conf

Reviewed by:	-current
Approved by:	bms(mentor)
2004-04-02 19:25:27 +00:00
Brooks Davis
3e091039ee Overhaul the /etc/rc.d/diskless script by splitting it out into
hostname, resolve, tmp, and var scripts.  The latter three are new and
were repo copied.  These scripts no longer depend on being booted with
and NFS root instead attempt to automaticly create mfs /tmp and /var
volumes if the they are not writable.  This behavior can be overridden
in /etc/rc.conf.

Reviewed by:    luigi, pjd
2004-03-23 23:22:35 +00:00
Max Laier
1f4408f321 Add rc.d script for pf(4) (more to come once pflogd(8) works as well).
Update defaults and write some lines for rc.conf(5) also.
Mostly dup'ed from ipf

Reviewed by:	-current
Approved by:	bms(mentor)
2004-03-23 22:30:15 +00:00
Doug Barton
0a54defb08 1. Remove the named_rcng variable. Mike's caution in this area was a good
thing, but we're ready to move on.

2. Remove the -g default argument in named_flags. It doesn't actually do
what most users think it does, and what most users want it to do is already
accomplished with a proper default group for the bind user, which we have.
Also, the -g knob does something entirely different in BIND 9, which leads
to a lot of needless confusion/aggravation.

3. In the rc.d script, don't bogusly override $command, or $rc_flags. Both
are adequately handled in rc.conf[.local].

4. DO properly override $rc_flags if user has named_chrootdir set.
This may need to be revisited, but should be ok for now.

5. Protect all chrootdir-related bits under that variable, instead of
named_rcng.

There is more work to be done here, especially in the area of BIND 9
compatibility, but this is a start at least.

Prompted in part by (legitmate) grousing from: kuriyama, Randy Bush
2004-03-14 19:10:06 +00:00
Mike Makonnen
30c360afba From the PR:
Certain MTA configurations mean that the notifications from
	virecover keep bouncing; so here's a patch to allow administrators
	to turn them off.

PR:		conf/54910
Submitted by:	bms (with a minor cleanup)
2004-03-03 15:21:01 +00:00
Dag-Erling Smørgrav
607b5a9109 Add support for initializing swap devices with random one-shot keys. Note
that the keys are currently generated by computing the MD5 checksum of 512
bytes read from /dev/random, and are passed to gbde on the command line.

Sponsored by:	Teleplan AS
2004-02-03 11:26:08 +00:00
Mike Makonnen
cc93dd4b73 Ruleset numbers are not allowed in devfs_* knobs.
Noticed by someone on -current.
2004-02-02 13:27:41 +00:00
Mike Makonnen
5d2885f928 Support starting/stoping of jails individually.
This commit also removes the support for the sysutils/jailer port. This
is inline with the general policy to keep ports related knobs out
of the base system's configuration mechanism.

Submitted by: Juergen Unger <j.unger@addict.de>
2004-02-02 13:25:28 +00:00
Colin Percival
7338182f91 If we're going to "add path 'fd/*' unhide", it only makes
sense to "add path fd unhide" first.

Requested by: mtm
Approved by: rwatson (mentor)
2004-01-22 20:53:15 +00:00
Sergey Babkin
dfa244fc22 Added support for intelligent handling of DST transitions in cron.
reviewed by: imp
2003-12-25 23:29:19 +00:00
Nate Lawson
3662033599 Add power_profile, a script that changes the ACPI CPU Cx idle state and/or
the throttling state in response to line transitions.  Future plans
include adding support for CPU frequency changes.

Add a devd.conf entry for calling this script.

The default values for this are:
performance_cx_lowest="HIGH"       # Use HLT (C0) online
performance_throttle_state="HIGH"  # 100% (no throttling)
economy_cx_lowest="LOW"            # Use the lowest Cx state possible
economy_throttle_state="HIGH"      # 100% (no throttling)
2003-12-18 04:39:57 +00:00
Sean Chittenden
12335de1f5 Backout ataraid rcng script. I must have missed ar0 in my scan of /dev
after my first reboot because sure enough, I'm seeing it there now and
ata(4) is doing the right thing(TM).

Pointed out by:	des
2003-12-14 13:36:36 +00:00
Sean Chittenden
7e6b2a1467 Add a script that allows software RAID sets to be created before file
systems are mounted.  An example set of entries for /etc/rc.conf:

ataraid_enable="YES"
ataraid_devices="ar0"
ataraid_ar0_set="ad2 ad3"
ataraid_ar0_type="RAID1"

Because there is no "correct" way of doing ATA raid (ie, geom vs.
atacontrol vs. vinum) that is bikeshed proof, this rcng script stays within
the bounds of atacontrol and assumes that other RAID solutions for GEOM or
vinum will end up in a different rcNG script.

Reviewed by:	green
2003-12-14 09:42:02 +00:00
Jesper Skriver
8ea562a029 Fix typo, I forgot daily_ in front of the status_ata_raid_enable 2003-12-12 21:23:27 +00:00
Bruce M Simpson
a2ed0b4e3d Add a means of starting an IKE daemon from the rc system at an appropriate
time during the boot process. This is needed in the case where NFS mounts
from servers reachable only via IPSEC are in /etc/fstab.

PR:		conf/42497
Submitted by:	Volker Stolz
Approved by:	re (rwatson)
2003-11-28 17:28:42 +00:00
Jesper Skriver
9eebf81523 Add status checking of ATA raid to the daily periodic scripts. 2003-10-27 20:14:53 +00:00
Warner Losh
e2b40c9599 any -> ? for new entry (to allow time for people to upgrade their pccardd) 2003-10-04 18:44:29 +00:00
Poul-Henning Kamp
77e8ad5714 Default ntpd to write a "driftfile" in /var/db/ntpd.drift.
A "driftfile" caches the oscillator offset estimate from boot to boot,
having this means faster and less bumpy time synchronization.  Will
be overridden by any value in the config file.
2003-10-03 21:33:40 +00:00
Poul-Henning Kamp
5e27a46ce9 As far as we know, there is no reason to not expose /dev/crypto in
jails so code in there can take advantage of hardware assisted
crypto.
2003-09-26 10:32:21 +00:00
Warner Losh
f1662e789e A new proxim harmony oem card spotted in the field.
Submitted by: Jeremy Bingham
2003-09-20 05:21:58 +00:00
Doug Barton
ea39e8caa9 Add a default setting of NO for the gbde auto attach script, and
document the options.
2003-09-18 09:59:37 +00:00
Jacques Vidrine
6d3001ca94 Add `-C 60' to the default flags for inetd, so that it is less
vulnerable to run-of-the-mill DoS attacks in the default installation.
2003-09-15 16:44:24 +00:00
Warner Losh
edacf73a07 add ELSA Vianect WLAN (Marco Wertejuk)
benq awl100 (David Leemans)

ObTerminalRoomCommit: done!
2003-09-10 01:14:07 +00:00
Mike Makonnen
66338db9e9 Enhance the jail start/stop script.
o The following additional configuration attributes of a jail can be
  controlled from rc.conf:
	- mounting devfs(5)
	- mounting fdescfs(5)
	- mounting procfs(5)
	- custom devfs(8) ruleset
	  If no ruleset is specified, the default jail ruleset is used.

o The output of executing /etc/rc in the jail is now redirected
  to /dev/null. Instead, the hostname of the jail is echoed if
  the jail(8) command exited successfully. If the output is wanted
  it can probably be redirected to a file (/var/run/$jail maybe)
  instead of /dev/null.

Submitted by:	Scot W. Hetzel <hetzels@westbend.net>
		with modifications by Jens Rehsack <rehsack@liwing.de>
		and me.
2003-08-24 06:29:32 +00:00
Mike Makonnen
c732f30398 o Do not keep a separate list of src/etc/defaults files in
the src/etc makefile. This list was used to manually
  install the files from src/etc. Instead, simply change
  directory and 'make install'.
o There is no reason for the files in src/etc/defaults to
  be installed as writeable.

Reviewed by:	ru
2003-08-24 03:24:54 +00:00
Mike Makonnen
4541e3ecc6 o Reduce rc(8) startup clutter by turning the informational messages
off by default.
o Apparently the routine displaying the informational messages wasn't
  checking its knob in rc.conf, so fix that as well.

Requested by:	obrien
2003-08-20 06:50:34 +00:00
Mike Makonnen
130112f793 Add a general mechanism for creating and applying
devfs(8) rules in rc(8). It is most useful for applying
rules to devfs(5) mount points in /dev or inside jails.
The following line of script is sufficient to
mount a relatively useful+secure devfs(5) in a jail:

	devfs_mount_jail /some/jail/dev

Some new shell routines available to scripts that source
rc.subr(5):
	o devfs_link		- Makes it a little easier to create symlinks
	o devfs_init_rulesets	- Create devfs(8) rulesets from devfs.rules
	o devfs_set_ruleset	- Set a ruleset to a devfs(5) mount
	o devfs_apply_ruleset	- Apply a ruleset to a devfs(5) mount
	o devfs_domount		- Mount devfs(5) and apply some ruleset
	o devfs_mount_jail	- Mount devfs(5) and apply a ruleset
				  appropriate to jails.

Additional rulesets can be specified in /etc/devfs.rules.
If the devfs_system_ruleset variable is defined in rc.conf
and it contains the name of a ruleset defined in /etc/defaults/devfs.rules
or user supplied rulesets in /etc/devfs.rules then that ruleset will
be applied to /dev at startup by the /etc/rc.d/devfs script. It can
also be applied post-startup:

	/etc/rc.d/devfs start

This is a more flexible mechanism than the previous method of using
/etc/devfs.conf. However, that method is still available.

Note: since devfs(8) doesn't provide any way for creating symlinks
as part of a ruleset, anyone wishing to create symlinks in a devfs(5)
as part of the bootup sequence will still have to rely on /etc/devfs.conf.
2003-08-20 06:15:18 +00:00
Hartmut Brandt
8b296e19bd Now that routes for IP over ATM may look much more complex than before,
use the atmconfig(8) utility instead of route(8) to install those routes.
For this we need a new rc.conf variable natm_static_routes that works
just like static_routes except that the referenced routes use the syntax
of atmconfig(8).

Okay'ed by:	mtm
2003-08-14 15:27:32 +00:00
Hajimu UMEMOTO
c8d9e00aca add rtsol_flags.
MFC after:	1 week
2003-08-08 17:43:58 +00:00
Warner Losh
ccce0204dc Add entries for NETGEAR MA401RA, IO DATA PCET10CL and Panasonic KXL-CB10AN.
Appologies to: those that submitted these to me.
2003-08-07 04:38:01 +00:00
Martin Blapp
70374dff23 Change the default for background_dhclient back to NO. It can
cause to much troubles with applications.
2003-07-28 13:09:00 +00:00
Martin Blapp
0888a8766e Always start dhclient in the background.
Reviewed by:	mtm
2003-07-28 08:15:52 +00:00
Diomidis Spinellis
cd51b9abed Added entry for Billionton LM5LT-10N
Fixed small typo

Reviewed by:	imp
Approved by:	imp
2003-07-22 21:23:01 +00:00
Warner Losh
b71e7cc1d9 Add support for DFE-670TXD to OLDCARD
Submitted by: David Wolfskill
PR: 53356
2003-07-19 05:40:06 +00:00
Sean Kelly
370c3cb57c - Add a software watchdog facility.
This commit has two pieces. One half is the watchdog kernel code which lives
primarily in hardclock() in sys/kern/kern_clock.c. The other half is a userland
daemon which, when run, will keep the watchdog from firing while the userland
is intact and functioning.

Approved by:	jeff (mentor)
2003-06-26 09:50:52 +00:00
Mike Makonnen
9ed30b5853 Update a comment about symlinking named's pid file to correctly
reflect the code.

Suggested by:	maxim
2003-06-14 22:26:30 +00:00
Mike Makonnen
d679c13014 The dhcp_program and dhcp_flags variables have to be renamed to
take advantage of the rc.subr(8) glue. They are renamed dhclient_program
and dhclient_flags.
	o Rename them in rc.conf(5)
	o Rename them in /etc/defaults/rc.conf
	o Add the deprecated variables to /etc/rc.subr
	o Isolate the use  of the 'command' variable to the
	  NetBSD specific parts in /etc/rc.d/dhclient.
	o Now that dhcp_flags has also been renamed it will
	  be applied properly by rc.subr(8) glue code.

Reported by:	John Nielsen <john@jnielsen.net>
2003-06-07 10:31:17 +00:00
Gordon Tetlow
25c01919eb Move networkfs_types from mountcritlocal into defaults/rc.conf as netfs_types.
Also add logic into mountcritremote to add extra_netfs_types to the list.

This unbreaks putting smbfs, portalfs and now nwfs in fstab.
2003-06-01 01:43:37 +00:00
Doug Barton
4b065e2ce1 Per previous announcement, remove the old version of the rc system.
All functionality from the previous system has been preserved, and
users should still customize their system boot with the familiar
methods, rc.conf, rc.conf.local, rc.firewall, sysctl.conf, etc.

Users who have customized versions of scripts that have been removed
should take great care when upgrading, since the compatibility code
that used those old scripts has also been removed.
2003-05-02 05:27:35 +00:00
Mark Murray
20a83c49ba Make the defaults for Kerberos 5 a little more up-to-date. 2003-04-30 20:58:49 +00:00
Mark Murray
7a4511d4cc Change the name of the kadmind binary to match reality, now that
KerberosIV is no longer an issue.
2003-04-30 20:42:41 +00:00
Warner Losh
e50dfdc9ab xten isn't needed after tw is gone.
Approved by: re@ (scottl)
2003-04-27 05:49:53 +00:00
Mike Makonnen
600b20796f Add new knobs for controlling jails in rc.d and document them.
Approved by:	makrm (mentor)
2003-04-16 16:29:51 +00:00
Takeshi Shibagaki
2ae05d4b0e Add NTT-ME SS-LAN CARD MN128. This card entry has been
committed into NEWCARD.
2003-04-10 17:16:01 +00:00
John Baldwin
3165d2ea56 Complete removal of 320.rdist by removing its entry from periodic.conf and
removing the related 220.backup-distfile script and associatd periodic.conf
entry.

Discussed with:	obrien
2003-04-01 17:45:27 +00:00
Maxim Sobolev
5edf954aad Add pc-card from ARCHOS CD-224E cdrom.
MFC after:	1 week
2003-03-28 11:12:52 +00:00
Crist J. Clark
5d75ba3db9 A new rc-ng script to build linker.hints files with kldxref(8)
automatically at boot time. Associated rc.conf(5) knobs and
documentation are included.
2003-03-17 23:15:53 +00:00
Doug Barton
52bf43dc11 Make it more clear how to disable keybell, and where its options are found.
PR:		conf/41772
2003-03-15 08:14:42 +00:00
Mark Murray
38b1858b1b Initiate KerberosIV de-orbit burn. Disconnect the /etc configs. 2003-03-08 09:50:11 +00:00
Takeshi Shibagaki
327c1562c5 Add YIS YWL-11B. 2003-02-15 14:04:05 +00:00
Gregory Neil Shapiro
5a8562abaf /etc/rc.network isn't built to handle a value of "DEFAULT" (nor should it
be).  Using that string leads rc.network to execute:

# sysctl -w vfs.nfs.bufpackets=DEFAULT
vfs.nfs.bufpackets: 4 -> 0

Which isn't what was intended.

PR:		conf/31280
MFC after:	3 days
2003-02-08 20:55:56 +00:00
Maxim Konovalov
5e024dbb52 ep(4) does not have link0 and link1 options.
PR:		conf/46651
Submitted by:	Eugene Grosbein <eugen@grosbein.pp.ru>
Reviewed by:	imp, mdodd
MFC after:	1 week
2003-02-04 14:10:55 +00:00
Takeshi Shibagaki
5770575cfc Add BUFFALO LPC-CF-CLT(10Base-T Compact Flash Ether Card). 2003-01-18 02:14:23 +00:00
Takeshi Shibagaki
03874c20cf Add Allied Telesis WR211PCM. 2003-01-17 18:50:00 +00:00
Mike Makonnen
69808e534d Add rc_debug knob to rc.conf. The code for it has been in rc.subr for
some time now.
Document all knobs introduced by rc.d

Approved by: markm (mentor)
Reviewd by: gordon (earlier revision)
2003-01-14 15:50:17 +00:00
Tom Rhodes
7ee7d3e359 Add an entry for the Dlink Air 660 Wireless PC Card.
PR:		46977
Submitted by:	gioria
Approved by:	imp
2003-01-14 00:50:30 +00:00
Mike Makonnen
48055d8c9d Fix the named script to find the correct pid file for the
named(8) daemon by providing a new rc.conf knob: named_pidfile
that defaults to the path specified in the system-installed named.conf(5).

Approved by: markm (mentor)
Reviewed by: dougb
Noticed by : Galen Sampson <galen_sampson@yahoo.com>
	     Dan Pelleg <daniel+bsd@pelleg.org>
PR: conf/46402
MFC:	2 weeks (with re@ approval)
2003-01-12 04:53:54 +00:00
Warner Losh
a13340a8e4 Either compaq has two variants of the WL200, or the old entry is
wrong.  Go ahead and include a second entry for the WL200 until I can
sort this out.

Submitted by: Matt Pearce
2003-01-10 18:35:20 +00:00
Garrett Wollman
ce54c9279d Tighten wording of comment.
Suggested by:	gshapiro
2003-01-08 18:52:32 +00:00
Garrett Wollman
de1d122868 Do not do manually what sendmail(8) can do better automatically.
Tell sendmail to clean up its own host status cache.
The error condition handling could probably be done better.
2003-01-08 18:51:45 +00:00
Kirk McKusick
123a5dff98 Delay an optional amount of time after booting before starting a
background fsck. The delay defaults to sixty seconds to allow
large applications such as the X server to start before disk I/O
bandwidth is monopolized by fsck.

Submitted by:	Brooks Davis <brooks@one-eyed-alien.net>
Sponsored by:   DARPA & NAI Labs.
2002-12-18 07:21:31 +00:00
Warner Losh
c1b4ec662a Make pccardd have -z by default. This fixes a few startup problems
where people want to have the cards configured.  Lack of -z is a speed
optimization.

Submitted by: many voices on mobile@
Approved by: re@ (rwatson)
MFC after: 3 days
2002-12-06 05:23:37 +00:00
Ruslan Ermilov
11aa179923 Fixed two typos in comments. 2002-11-15 08:26:36 +00:00
Warner Losh
91618540a1 Turn off devd until I have a devd.conf file that I can install one
that does no harm.
2002-11-12 07:10:45 +00:00
Warner Losh
4cb1a7dfa3 Add devd_enable
Submitted by: dougb
2002-11-10 09:13:31 +00:00
Hajimu UMEMOTO
7b988fe73c Add IPv6 setup for ipfilter. `ipv6_ipfilter_rules' was added
to specify rules definition file for ipfilter.  The default is
/etc/ipf6.rules.  If there is a file which is specified by
'ipv6_ipfilter_rules', IPv6 rule is installed.

Reviewed by:	Ronald van der Pol <Ronald.vanderPol@rvdp.org>
MFC after:	1 week
2002-11-02 08:21:26 +00:00
Thomas Quinot
7644e396f3 Add a new /etc/periodic/security script to check for packets
rejected by ipfilter (510.ipfdenied), and a corresponding periodic.conf
knob (daily_status_security_ipfdenied_enable).

Reviewed by:	roberto
Approved by:	re@
2002-10-25 15:16:54 +00:00
Warner Losh
e98304b93f SAMSUNG SWL-2000P PCI Card
Submitted by: Robert Dezorzo
2002-09-30 01:19:52 +00:00