Commit Graph

748 Commits

Author SHA1 Message Date
Colin Percival
1dcb6ad173 When stopping powerd, set the CPU frequency back to its maximum value
(i.e., what it was almost certainly at before powerd was started).

Submitted by:	R.B. Riddick
MFC after:	3 days
2006-08-27 11:04:39 +00:00
Florent Thoumie
1ff6181777 - Add ypserv to the REQUIRE list.
Reported by:	David Thompson <dat1965@yahoo.com>
Discussed on:	-rc (brooks)
Approved by:	cperciva (mentor, implicit)
MFC after:	3 days
2006-08-22 14:58:23 +00:00
Florent Thoumie
3081bf98bf Backout this commit since it breaks startup and some scripts in
certain conditions. I haven't been able to find a better solution yet:

    - Set a two read-only variables (${prefix} and ${etcdir}). This is
    especially useful when using /etc/rc.d scripts with third-party
    software installed from ports.
    - Fix rc.d/sshd to work with openssh from ports using ${etcdir}
    instead of hardcoded /etc.
    - Reflect prefix/etcdir changes in rc.subr.8.

        src/etc/rc.d/sshd: rev 1.9 -> 1.10
        src/etc/rc.subr: rev 1.51 -> 1.52
        src/share/man/man8/rc.subr.8: rev 1.11 -> 1.12

Approved by:	cperciva (mentor)
2006-08-22 11:17:29 +00:00
Florent Thoumie
94733fef16 - Remove ramdisk rc.d scripts since they've been replaced by mdconfig{,2}.
- Update ObsoleteFiles.inc.

Approved by:	cperciva (mentor)
2006-08-22 11:12:09 +00:00
Brian Somers
5f9d14bd5f Add a missing quote
Spotted by: ru
2006-08-17 19:57:10 +00:00
Brian Somers
9341e8dd88 Add a -p switch to dhclient. The switch tells dhclient to persist
despite the interface link status.

Add dhclient_flags_iface and background_dhclient_iface rc.conf options.
(where iface is a specific interface).  These can be used to give
interface specific flags to dhclient.

Reviewed by:	brooks@
2006-08-17 17:12:27 +00:00
Dag-Erling Smørgrav
7f113673df Forgot to add mountlate to the Makefile. 2006-08-04 18:37:03 +00:00
Stephen McKay
55fd436b5f This script should probably have an enabling variable since it can produce
surprising results.  For now, at least make it safe to boot the default
kernel when /boot/kernel is already a symlink.
2006-07-30 12:54:37 +00:00
Yaroslav Tykhiy
e8a49a350c De-uglify messages from the ipfw script. 2006-07-25 17:28:18 +00:00
Yaroslav Tykhiy
53ec689458 Use more rc.subr(8) features.
Skip useless work when ${natd_interface} is unset.
Double quote user-supplied vars unless there is a reason not to.
2006-07-25 17:25:44 +00:00
Pawel Jakub Dawidek
77ed5b08c5 Don't load geom_md.ko if there is no need to. 2006-07-25 17:19:00 +00:00
Yaroslav Tykhiy
9f8b57f078 Since Alpha support isn't in HEAD anymore, remove Alpha-specific
rc.conf(5) knobs, too: osf1_enable, unaligned_print.
2006-07-21 15:55:18 +00:00
Florent Thoumie
ca3a4056ad - Remove hardcoded /etc/ntp.conf configuration file from ntpdate rc.d script
and replace it with a new ntpdate_config variable.
- Document it in defaults/rc.conf and rc.conf.5.
- Document ntpdate_hosts in defaults/rc.conf.

Requested by:	Chris Timmons <cwt@networks.cwu.edu>
Approved by:	cperciva (mentor, implicit)
MFC after:	1 week
2006-07-20 10:07:34 +00:00
Dag-Erling Smørgrav
4b4f91707c Teach mount(8) about a 'late' keyword, which means the file system should
not be mounted unless the -l flag was specified.

Add an rc script, mountlate, which basically runs 'mount -a -l'.  It runs
after DAEMON but before LOGIN.

This is useful for things like loopback mounts, because mountcritremote
runs before mountd  / nfsd (since /usr might be a remote file system), so
an attempt to mount a loopback network file system in mountcritremote will
fail.

Also add a progress message to mountcritlocal, for the sake of symmetry
with similar messages in mountcritremote and mountlate.

Reviewed by:	freebsd-rc
MFC after:	3 weeks
2006-07-12 16:05:51 +00:00
Stefan Farfeleder
3177f91ed1 Fix spelling in a comment. 2006-07-09 06:54:24 +00:00
Florent Thoumie
99762b28b6 Since INSTALLS_SHLIB has been superseded by USE_LDCONFIG in bsd.port.mk, I
expect to see quite a few files appearing in libdata/ldconfig directories.
This change avoids the screen to be filled with the names of those ldconfig
files and replace them by the actual non-default directories they contain.
Most of them will be ${PREFIX}/lib so, 'sort -u' will help reducing the
output.

Approved by:	cperciva (implicit)
MFC after:	1 week
2006-06-21 10:22:44 +00:00
Yaroslav Tykhiy
78004009df Set an example of using load_kld() from rc.subr. 2006-06-21 09:53:25 +00:00
Tom Rhodes
b546d0bbc1 Sync to p4:
o Add shutdown KEYWORD;
o Remove PID check;
o Stop auditd with '-t'
o General cleanup.
2006-06-06 17:22:55 +00:00
Hajimu UMEMOTO
5f467a3bb6 flush' is appropriate than reload'.
Requested by:	ceri
2006-06-06 15:34:50 +00:00
Hajimu UMEMOTO
84f03df02c Add `reload' which invalidates the cache for every user. 2006-06-06 12:55:58 +00:00
David E. O'Brien
991d907d3e Use an option form better matching the manual. 2006-06-05 03:47:14 +00:00
Andrew Thompson
55ba40bfe2 Add rc.d/bridge which is invoked when a new interface arrives and can
automaticly add it to an Ethernet bridge. This is intended for applications
such as qemu, vmware, openvpn, ... which open tap interfaces and need them
bridged with the hosts network adapter, the user can set up a glob for
interfaces to be automatically added (eg tap*).
2006-06-01 11:01:54 +00:00
Andrew Thompson
f3b90d48bb Announce all interfaces to devd on attach/detach. This adds a new devctl
notification so all interfaces including pseudo are reported. When netif
creates the clones at startup devctl_disable has not been turned off yet so the
interfaces will not be initialised twice, enforce this by adding an explicit
order between rc.d/netif and rc.d/devd.

This change allows actions to taken in userland when an interface is cloned
and the pseudo interface will be automatically configured if a ifconfig_<int>=""
line exists in rc.conf.

Reviewed by:		brooks
No objections on:	net
2006-06-01 00:41:07 +00:00
Matteo Riondato
ce5c66f0b2 Add jail_<jname>_exec_afterstart<N> rc.conf variable, where <N> is
1,2 and so on.
It specifies the command to be run as Nth after jail startup.

sh(1)-fu by: Dario Freni
PR: 	conf/97697
MFC after: 2 weeks
Reviewed by: ru@ (man page)
2006-05-30 16:20:48 +00:00
Matteo Riondato
200ea54812 style(9) 2006-05-30 16:07:59 +00:00
Gleb Smirnoff
996e95d306 Quote the parameter to sysctl(1), allowing to use whitespaces in
sysctl values.

PR:		conf/96509
Submitted by:	Gregory Bond <gnb itga.com.au>
2006-05-24 11:36:48 +00:00
Florent Thoumie
0e5c8f9a0f Remove the require_kld function I just committed and replace with a nicer solution.
Reported by:	pjd
Approved by:	cperciva
2006-05-18 16:04:56 +00:00
Florent Thoumie
01b19d7852 Add two new scripts (mdconfig/mdconfig2) to replace old ramdisk{,-own}
scripts. These scripts handle vnode backed md(4) devices.

Old ramdisk{,-own} scripts will stay a bit in CVS to allow some time for
migration since variable names have changed (ramdisk_* -> mdconfig_*).

Two new variables have been introduced to be able to populate the md(4)
device once it has been mounted (mdconfig_*_files and mdconfig_*_cmd).

Use should be as easy as:

mdconfig_md0="-t malloc -s 10m"
mdconfig_md1="-t vnode -f /var/foo.img"

See rc.conf(5) for more information and description of the additional
variables.

Approved by:	cperciva
2006-05-18 15:29:27 +00:00
Matteo Riondato
a697c38c3d Correctly set moused_$2_enable when moused_nondefault_enable is set to NO
PR:		conf/92654
MFC after:	3
2006-05-17 11:37:09 +00:00
Poul-Henning Kamp
f6ce2a64f7 Send the pcvt(4) driver off to retirement. 2006-05-17 09:33:15 +00:00
Max Laier
9277da52e1 Move etc/rc.firewall6 to ipfw2+v6, update related rc.d and periodic scripts.
Since ipfw2 now does dual-stack, statistics for IPv6 come from the ipfw
scripts as well.
2006-05-12 19:17:34 +00:00
Florent Thoumie
b246e9314d - Change the "jail_" prefix for internal script variables. This fixes an
issue where some global jail_* variables were overriden in the script. [1]
- Change "jid" to "jname" in rc.conf(5), since it's more a jail name than a
jail id. [1]
- Update examples and comments in defaults/rc.conf to advertise new
variables and the fact that some of the jail-specific variables may be made
jail-global. [2]

Reported by:	pjd [1], clsung [2]
Approved by:	cperciva
X-MFC after:	i got sufficient testing from people using rc.d/jail
2006-05-11 14:23:43 +00:00
Matteo Riondato
8fc80fd71f if we fail to start a jail and jail_foobar_*fs_enable or jail_foobar_mount_enable were set, umount those filesystem before exiting. If we set up an alias for jail's IP, remove that alias before exiting.
MFC after:	2 weeks
2006-05-11 13:29:01 +00:00
Matteo Riondato
8cf29c0839 if a jail fails to start, don't add its jid to /var/run and print a message with the error.
PR:	conf/97024
MFC after:	1 week
2006-05-09 17:50:16 +00:00
Florent Thoumie
656a2a8738 - Fix quoting.
Reported by:	Dirk Engling <erdgeist@erdgeist.org>
Pointyhat to:	self
2006-05-08 17:32:45 +00:00
Florent Thoumie
46d5426b1b - Check for some mandatory variables.
Approved by:	cperciva (mentor)
MFC after:	1 week
2006-05-07 23:15:39 +00:00
Hajimu UMEMOTO
321000dda1 Install /etc/nsswitch.conf statically rather than generating it at
boot.  Autogeneration of nsswitch.conf doesn't makes sense in 7.0
since it's not permitted to upgrade from a pre-nss release without
passing through an intermediate release.

Suggested by:	brooks
2006-05-03 15:14:47 +00:00
Dag-Erling Smørgrav
f60446ffff Update host.conf every time nsswitch.conf changes, instead of just creating
it if it does not exist.

Submitted by:	Rostislav Krasny <rosti.bsd@gmail.com>
MFC after:	2 weeks
2006-05-01 11:02:48 +00:00
Hajimu UMEMOTO
bda1fb2baf Oops, services should be compat by default for backward compatibility. 2006-04-29 06:39:07 +00:00
Hajimu UMEMOTO
de4bee5922 Add newly supported databases such as services, protocols and rpc
into generated nsswitch.conf.
2006-04-29 04:49:19 +00:00
Hajimu UMEMOTO
06a99fe36f - Extend the nsswitch to support Services, Protocols and Rpc
databases.
- Make nsswitch support caching.

Submitted by:	Michael Bushkov <bushman__at__rsu.ru>
Sponsored by:	Google Summer of Code 2005
2006-04-28 12:03:38 +00:00
Xin LI
c1a91869f7 After some discussion we believe that having SERVERS to REQUIRE:
ldconfig would provide necessary protection for named as well,
so remove the dependency here.

Approved by:	flz
2006-04-20 12:30:12 +00:00
Xin LI
85fa745d03 Make ldconfig as SERVER dependency. This makes it possible
for some early starting services from the ports collection
to have their shared objects available before start.

Reviewed by:	freebsd-rc (dougb, brooks)
MFC After:	3 days
2006-04-19 05:10:34 +00:00
Florent Thoumie
455c5d38be - Add new ntpd_config variable so that people can override it in rc.conf.
- Add default value in /etc/defaults/rc.conf.
- Add documentation bits to rc.conf(5).

Approved by:	cperciva (mentor)
MFC after:	1 week
2006-04-18 15:02:24 +00:00
Florent Thoumie
caadf315e9 Add ldconfig to the list of requirements for named, needed to use bind
from ports. The effect is that ldconfig is now started right after
mountcritremote. Everything else is left unchanged.

PR:		conf/68916
Submitted by:	JD Bronson <jd@aurora.org>
Approved by:	cperciva (mentor)
MFC after:	1 week
2006-04-18 10:35:05 +00:00
Hajimu UMEMOTO
93dd0fa390 Remove an inappropriate comment which is put into generated
host.conf.  Someone may want to edit it later.

Requested by:	Rostislav Krasny <rosti.bsd__at__gmail.com>
2006-04-12 12:01:53 +00:00
Florent Thoumie
66643ebe4c - Fix rc.d/sshd test on kern.random.sys.seeded.
PR:		conf/94377
Submitted by:	dwhite
Approved by:	cperciva (mentor)
MFC after:	1 week
2006-04-11 09:08:15 +00:00
Florent Thoumie
4016cfa64c - Fix amd startup when amd is installed from ports.
- Add the according amd_program default value in defaults.

PR:		conf/82738
Submitted by:	TAOKA Fumiyoshi <fmysh@iijmio-mail.jp>
Approved by:	cperciva (mentor)
MFC after:	3 days
2006-04-11 09:02:07 +00:00
Florent Thoumie
f0a4a7a722 - Set a two read-only variables (${prefix} and ${etcdir}). This is
especially useful when using /etc/rc.d scripts with third-party
software installed from ports.
- Fix rc.d/sshd to work with openssh from ports using ${etcdir}
instead of hardcoded /etc.

Reviewed by:	brooks
Approved by:	cperciva (mentor)
MFC after:	1 week
2006-04-11 08:55:27 +00:00
Florent Thoumie
69beb663f5 - Add following global jail options, used if no jail-specific options are
set:
 * jail_mount_enable
 * jail_devfs_ruleset
 * jail_devfs_enable
 * jail_fdescfs_enable
 * jail_procfs_enable
 * jail_fstab
 * jail_flags
- Add a jail_interface / jail_<jid>_interface option. An ip alias will be
created (jail_<jid>_ip) on jail_interface or jail_<jid>_interface if set.
This is not a mandatory option.
- Document all missing jail_* options in rc.conf(5).

Approved by:	cperciva (mentor)
MFC after:	2 weeks
2006-04-08 12:15:36 +00:00