Commit Graph

727 Commits

Author SHA1 Message Date
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