Commit Graph

707 Commits

Author SHA1 Message Date
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
Simon L. B. Nielsen
c83ae5bfc9 Remove redundant ike rc.d script, since we do not have an IPsec IKE
daemon in the base system and all the IKE daemons in the Ports
Collection has their own rc.d script.

OK'ed by:	dougb
Discussed on:	freebsd-rc
MFC after:	1 month
Approved by:	cperciva (mentor)
2006-03-28 18:28:33 +00:00
Ruslan Ermilov
f557468cb8 Add an example of how to set up a 3-wire serial terminal.
Usually, getty(8) does the trick, but if you just need a
serial console without getty(8), here's how.
2006-03-23 08:48:38 +00:00
Florent Thoumie
4442f896de - Replace awk parts with shell.
Approved by:	brooks
MFC after:	2 weeks
2006-03-20 18:00:14 +00:00
Ruslan Ermilov
e1fe3dba5c Reimplementation of world/kernel build options. For details, see:
http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html

The src.conf(5) manpage is to follow in a few days.

Brought to you by:	imp, jhb, kris, phk, ru (all bugs are mine)
2006-03-17 18:54:44 +00:00
Dag-Erling Smørgrav
6f3274197b This script symlinks /boot/kernel to the directory that contains the kernel
you booted from, unless /boot/kernel already exists and is not a symlink.
This should only affect people like me who juggle multiple kernels and
have KODIR = /boot/${KERN_IDENT} in /etc/make.conf to keep them apart.
2006-03-17 16:28:12 +00:00
Maksim Yevmenkin
6fc8bb3fd9 Reorganize /etc/rc.d/syscons and move all keyboard related settings
into one function syscons_configure_keyboard(). Call new function from
both syscons_start() and sysconst_setkeyboard(). The reason for this
is because syscons_start() will (re)configure both keyboard and screen
settings. Apparently, some graphics cards have problems with running
vidcontrol(1) while X11 is running.

Remove "/etc/rc.d/syscons restart" from /etc/devd.conf. It is no longer
required. Using "/etc/rc.d/syscons setkeyboard" is enough. This also
should fix annoying "syscons not running?" message.

Tested by:	Ulrich Spoerlein < q at galgenberg dot net >
MFC after:	3 days
2006-03-16 17:42:28 +00:00
Max Khon
409a60927b Fix overriding jail_list from command line.
MFC after:	3 days
2006-03-08 20:40:37 +00:00
Maksim Yevmenkin
dfc1c0ba36 Add new 'setkeyboard' method to the /etc/rc.d/syscons. It accepts the
keyboard device name (i.e. /dev/kbd0). This method will do nothing is
kbdmux(4) is the current active keyboard, otherwise it will switch
active keyboard as requested.

Modify ukbd(4) entries in the /etc/devd.conf to use /etc/rc.d/syscons
and new 'setkeyboard' method.

No comments from:	freebsd-current@
MFC after:		1 day
2006-03-06 06:38:34 +00:00
Wojciech A. Koszek
46e6cc852b Use 'ipfw list' instead of 'ipfw l', since it's deprecated (and warning is
printed on system startup).

Approved by:	cognet (mentor)
MFC after:	3 days
2006-02-26 16:45:29 +00:00
Doug Barton
f50a4cf27c Make sure abi (and therefore archdep) start before SERVERS as part of
the ongoing re-alignment of ordering that is necessary as a result of
including local scripts in the base rcorder. [1]

Accomplish this by removing the BEFORE's, and using REQUIRE instead.
This makes the dependencies more obvious, and less susceptible to turning
circular and/or nonsensical when seemingly innocent changes are made
in one place and not another.

Requested by:	delphij [1]
2006-02-19 08:18:48 +00:00
Ruslan Ermilov
2bf76d274f Check if /sbin/nextboot exists before running it.
PR:		93466
Submitted by:	Mats Palmgren
2006-02-17 08:34:01 +00:00
Marcel Moolenaar
1c71a2c535 On ia64, the unaligned_print sysctl is a debugging knob under debug
and not under machdep as the behaviour is controlled by the process.
When PSR.ac is set the process expects to receive a SIGBUS. Otherwise
the processor or the kernel will emulate the misaligned memory access.

MFC after: 3 days
2006-02-13 21:41:32 +00:00
Warner Losh
1d384e3a1a Since OLDCARD is gone from the kernel, catchup here and remove support
from here as well.
2006-02-13 20:08:31 +00:00
Doug Barton
196b6a193e Overhaul the named boot script:
1. Remove a now-spurious NetBSD CVS Id, as we are no longer synching work
2. Remove a now-spurious BEFORE, since ntpdate now REQUIRE's named
3. Replace the call to set rcvar with what that function would output,
and generally reduce indirection ($name -> named) since it's highly
unlikely the name of the named process or service will change any time soon.
4. Resort the order the variables at the top of the file to a more
traditional format, and remove a spurious required_dirs from the top, as it
works better after load_rc_config.
5. We do not want the default reload method with named, so define a simple
but appropriate substitute using rndc. If I were writing this script for
the first time I would not include this at all, since it's preferable to
control a running daemon with rndc to start with, but given that this is
already here, let's do it right. I hope that future generations will
however resist the tempation to add reconfig to extra_commands.
6. By the same token, we want to use rndc to shut down named, but given
that by defining a stop function we lose the "find the process by its
pid file in an emergency" goodness of rc.subr, try to do something useful
in the event that rndc is not available, and keep the user informed.
7. Replace some "test -f" with "test -r" to handle the unlikely event
that the relevant file exists, but is unreadable.
8. Twiddle whitespace in a few areas, remove a spurious blank line,
a bogus double space, and try to do better indenting.
9. Improve generation of the rndc.key file significantly
a. If for some reason a user has an rndc.conf file, assume that they
did that on purpose, and hence know what they are doing, so leave them alone.
b. Introduce a named_uid configuration variable so that the user which owns
the rndc.key file and the user named runs as always match, and is more
easily configurable. This should dramatically reduce problems with rndc.
c. Also test that the rndc.key file size is greater than zero, rather than
simply that the file exists. I have seen at least one user report this exact
problem, and although neither of us is sure where the empty file came from,
the fix is simple, so include it.
d. Rather than try to create an rndc.key file in both /etc/namedb and the
chroot'ed /etc/namedb, assume that they are be the same (which they should
be), and only create the file in the chroot'ed version of the directory.
This partially addresses the problem described in conf/73929, but I have
not yet finished thinking about the PREFIX issue that PR also raises.

As a result of introducing the named_uid knob, the default named_flags
are now empty.

Update defaults/rc.conf and rc.conf(5) to reflect these changes.
2006-02-13 08:45:51 +00:00
Matteo Riondato
151903dc6c Make localpkg print local scripts names when the boot is verbose
PR:		conf/68525
Approved by:	philip (mentor)
MFC after:	3 days
2006-02-12 10:04:56 +00:00
Max Laier
d662ee1c20 pflog is a separate module now.
Submitted by:	Antoine Brodin
PR:		kern/88271
MFC after:	1 week
2006-02-05 22:38:08 +00:00
Florent Thoumie
b03bfd3552 - Add a startup script for hostapd.
- Document associated variable in rc.conf(5).

Approved by:	dougb
MFC after:	1 week
2006-02-03 01:35:36 +00:00
Robert Watson
e0e0ae286e Add auditd rc.d script.
Submitted by:	trhodes
Obtained from:	TrustedBSD Project
2006-02-02 10:02:55 +00:00
Alexander Leidinger
77a1d1e153 As a quick fix disable the update of the linux ld.so.cache file, since
currently it grabs some FreeBSD native libs too.

A final solution is under discussion with brooks.
2006-01-24 18:58:48 +00:00
Pawel Jakub Dawidek
219d40fbb1 The 'reload' command did the same as 'restart' command.
Allow user to decide if SAD and SPD entries should be flushed on 'reload'.
With this change flush/spdflush is not done automatically (it could still
be done from ipsec.conf).
2006-01-24 15:16:55 +00:00
Pawel Jakub Dawidek
76098314b0 Remove stale comment.
This change should be made in rev1.9.

MFC after:	1 week
2006-01-24 15:12:44 +00:00
Pawel Jakub Dawidek
2d7b446560 Use $ipsec_file instead of hardcoded /etc/ipsec.conf.
This change should be made in rev1.2.

MFC after:	1 week
2006-01-24 15:11:11 +00:00
Yaroslav Tykhiy
24c307eac7 Add an rc.d script for stand-alone ftpd.
Document the script's controls on the rc.conf(5)
manpage and touch its Dd.

PR:		conf/90893
MFC after:	5 days
2006-01-21 18:08:16 +00:00
Matteo Riondato
7c0c5d7027 Allow the use of wildcarded device names in devfs.conf
PR:		conf/90760
Submitted by:	Darren Pilgrim <darren.pilgrim@gmail.com>
Approved by:	philip (mentor)
2006-01-21 14:31:45 +00:00
Wes Peters
243f6516f8 Tell nextboot to clean up after itself. 2006-01-18 04:53:48 +00:00
Philip Paeps
d22761024e Remove the module loading magic again; it's not needed after all.
Pointy hat to:	matteo
Submitted by:	matteo
Reviewed by:	pjd
MFC after:	3 days
2006-01-17 19:29:31 +00:00
Philip Paeps
ebc1e627c8 Load the g_md kernel module if needed.
Pointed out by:	Gianmarco Giovannelli
Submitted by:	matteo
MFC after:	3 days
2006-01-16 13:26:05 +00:00
Doug Barton
6e7b73e090 REQUIRE named. On all systems I've examined running HEAD and
RELENG_6 this will be a noop, however as we introduce local
startup scripts to the base rcorder, we'll see more cases
where the previous status quo will need to be made explicit
to avoid having it disrupted when random local scripts are
added to the mix.
2006-01-16 06:03:42 +00:00
Ceri Davies
f2072da025 Marius Nuennerich pointed out that nextboot(8) configured boot options
were now sticky.  This script was deleting /boot/nextkernel on boot, but
there is no code in the tree that creates that file since revision 1.15
of src/sbin/reboot/reboot.c.
nextboot(8) creates /boot/nextboot.conf, so remove that instead.

Approved by:	jhb (proxy mentor)
MFC after:	1 week
2006-01-15 23:12:26 +00:00
Brooks Davis
de3a554cd4 Be a little more read-only file system friendly when running the Linux
ldconfig.  Build the cache in a temporary directory and only install it
if it's actually different that the installed one.

Also, use "cat tmp > real" to install the temporary file in the real
location to allow the real location to be a symlink to a writable
directory such as /var/run (where the file actually belongs).

MFC After:	5 days
2006-01-11 21:30:41 +00:00
Doug Barton
dfdae5534f Add a mechanism to include files added by ports which contain
the names of directories to include in the base ldconfig script.
This will eliminate the need for each port to install its own
boot script which does nothing but ldocnfig a given directory.

This code was developed by flz (ports committer), discussed on
freebsd-rc@, and modified slightly by me.

Submitted by:	flz
Reviewed by:	brooks
2006-01-08 10:15:31 +00:00
Ralf S. Engelschall
b3d60bd52e 1. Add missing semicolon between "warn" and "return" to make sure
the line continuation backslash doesn't cause "warn" to print "return".
2. Group "warn" and "return" together as the "return 1" should be
   performed only if the "kldload nfsclient" also failed (and not
   already if the "vfs.nfs" sysctl(8) check failed).

MFC after: 3 days
2005-12-30 09:16:23 +00:00
Ralf S. Engelschall
8fc934b8fa Remove superfluous line continuation backslash.
MFC after: 3 days
2005-12-30 08:57:33 +00:00
Doug Barton
cc41555849 Fix another braino, don't remove the X related socket directories
right after creating them.

Twiddle whitespace while I'm here.
2005-12-27 23:22:18 +00:00
Doug Barton
eeb92ff283 Make sure that the prestart routine is run with *start, instead of
just 'start'.

Reminded by:	keramida
2005-12-27 23:08:58 +00:00
Doug Barton
91e7f8f09d syslogd should REQUIRE newsyslog, rather than newsyslog using
BEFORE: syslogd. This does not produce any change in the
ordering at the moment, but is cleaner style for the long term.
2005-12-21 09:54:15 +00:00
Doug Barton
27c4192acb Several users have commented (via filing PRs) that having ntp* depend
on devfs is useful so that a hardware time device can start with its
necessary device nodes already in place. While this ordering happens
as a side effect currently in HEAD, and the PRs were generally fixed
via upgrades, etc; it's better to make it explicit.

While I'm here, ntpd should REQUIRE ntpdate, rather than ntpdate
using BEFORE: ntpd.
2005-12-21 09:48:41 +00:00
Doug Barton
d6209fadb2 REQUIRE: syslogd and BEFORE: NETWORKING are now antithetical,
and including both in this file had nasty side effects on the
ordering of syslogd, as well as producing an error when running
rcorder. Remove the more bogus of the two options, which restores
proper ordering and removes the error.

There is an open question as to whether scripts with the nostart
KEYWORD should even have REQUIRE/BEFORE lines, and indeed, whether
they should be in /etc/rc.d at all, but that's for another time.
2005-12-21 01:19:20 +00:00
Doug Barton
2092fca981 Include a somewhat hackish way to make sure that we *always* test the
new clear_tmp_X variable when start'ing.
2005-12-20 23:22:47 +00:00
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