Commit Graph

549 Commits

Author SHA1 Message Date
christos 8f0c389494 wait until our local address is available before configuring. 2013-09-12 19:52:50 +00:00
roy d87d6793f0 Add _rtadvd user and group.
Add a chroot dir for the _rtadvd user.
Drop privs to the user _rtadvd after acquiring our socket.
When rc.d/rtadvd starts or reloads, the rtadvd config file is copied
into the chroot before starting or reloading rtadvd itself.
Create a symlink from /var/run/rtadvd.dump to the chroot

Inital idea from OpenBSD patch rtadvd.c r1.36
2013-07-09 09:34:58 +00:00
roy e3bb11dade Add a hack to fix the dhcpcd rc.d script to work with a single
interface specified in dhcpcd_flags in rc.conf(5).
Fixes PR bin/43490
2013-06-25 13:02:53 +00:00
christos aa3896734e if ipsec_flags is given, treat it as an interface name and change @LOCAL_ADDR@
to the IP address for it. This makes dynamic addresses work during autoconf.
Also while here in restart, re-use start and stop instead of duplicating them.
2013-06-14 16:37:55 +00:00
yamt 8782935dec try to sync lists of rc.d scripts 2013-05-16 07:37:05 +00:00
christos a33513dc62 don't attempt to create interfaces that exist and don't hide errors. 2013-04-20 18:24:18 +00:00
christos df473aee24 PR/47540: Felix Deichmann: DSA keys can only be 1024 bits. 2013-02-07 19:32:19 +00:00
tron b1d97a6429 Make custom "reload" target work. Before this fix it would have tried
to send a HUP signal to "wpa_supplicant" instead.
2013-02-01 13:29:33 +00:00
prlw1 281a5e1fdb Add ppp=YES variable. Currently pppd(8) starts automatically if ppp_peers
is not empty. Adding a ppp variable allows the default peer to be set,
and ppp set to NO so that dialing can happen with /etc/rc.d/ppp onestart.
Default set to YES so that old behaviour is preserved.
http://mail-index.netbsd.org/tech-userlevel/2012/08/21/msg006656.html
2013-01-13 18:47:57 +00:00
christos 191ca062bf add a sync to make it less likely to boot with /etc pointing to nothing after
a crash.
2012-12-31 23:21:27 +00:00
christos 7c8b13934d better messages, more quoting. 2012-12-29 22:15:07 +00:00
apb 448aa50d4c Reinstate the dirname invocations that were recently removed from
rc.d/random_seed.  The new dirname shell function provided by rc.subr
will be used, so it should work before the /usr file system is mounted.

This should fix a problem in which the fs_safe shell function failed when
passed the name of a file that did not exist.
2012-12-17 18:20:50 +00:00
apb c755e023f2 Avoid using programs from /usr/bin. This should fix PR 47326.
- no need for "dirname", because "df -G" can take a file name directly.
- replace use of "awk" with a shell while read loop.
- replace use of "stat -s" with "ls -ldn".
- no need for "tail" now that the use of "stat" has changed.

While here, also add some shell quotes and improve the grammar in a comment.
2012-12-14 18:42:25 +00:00
wiz 0450412e67 Revert previous.
At the least, it was committed with the wrong commit message.
2012-12-13 21:51:52 +00:00
roy 8c91938135 Add a pidfile and the reload command. 2012-12-13 15:51:17 +00:00
prlw1 4d6ed13889 Make sure that ntpd creates a pid file for the rc machinery to work.
http://mail-index.netbsd.org/current-users/2012/11/19/msg021518.html
2012-12-04 16:38:40 +00:00
apb 5f5f1a05cc Cause /etc/rc.d/random_seed to be the first script to run
after mountcritlocal.  Everything else that runs after
mountcritlocal depends directly or indirectly on bootconf, so
making random_seed run before bootconf has the desired result.
2012-11-10 15:10:22 +00:00
apb e36b9f4a97 Make /etc/rc.d/ttys run after /etc/rc.d/bootconf.sh,
because bootconf could conceivably change /etc/ttys.
2012-11-10 15:08:36 +00:00
yamt a015b2b8c4 print something before sleeping so that a user like me can see
what the mysterious pause is.
2012-11-02 08:36:13 +00:00
mrg 578c31536d catch up with npfctl moving to /sbin.
untested, but i guess so was the move itself ;)
2012-11-01 06:06:14 +00:00
apb 410421ee21 Avoid using glob patterns that might match enough files to give
"Arg list too long" errors.  Change the "find" command to use
"-exec ... +" instead of "-exec ... \;" to make it more efficient.
2012-10-24 21:23:55 +00:00
christos d60db5e056 PR/47024: Taylor R Campbell: handle "keys" directory and directory
permissions in general
2012-10-01 18:46:43 +00:00
wiz c9ea1856a7 Use new makemandb -Q flag to be really quiet. 2012-08-29 20:34:18 +00:00
hans f9669c1ea4 It's msdos, not msdosfs. 2012-07-08 14:25:49 +00:00
isaki b1d94e60d6 Remove unnecessary checkyesno which I commited before.
${rcvar}_start is skipped if rcvar is not set to YES.
Pointed out by joerg@ and tsutsui@.
Should be pulled up to netbsd-6.
2012-06-17 02:13:13 +00:00
isaki f28248caf4 Allows you to disable it if makemandb=NO in rc.conf.
Thanks tsutsui@ and Yasushi Oshima.
2012-06-12 02:25:29 +00:00
joerg 1907ec3a61 Switch device database to cdb(5). Rework ttyname(3) and ttyname_r(3) to
depend on new devname_r(3) as heart. Add /dev/pts magic directly to
devname(3). While it can lead to returning non-existing paths, the
behavior is more consistent that way. Drop caching layer in devname(3),
it doesn't buy anything for the common case of having access to the
database. Teach devname(3) proper fallback behavior of scanning /dev.
Create both old-style and new-style database for now in /etc/rc.d/sysdb.
2012-06-03 21:42:44 +00:00
gendalia 7591311640 Add the ability for staticroute to evaluate lines from /etc/route.conf
as shell script fragments, add example to the route.conf man page of
evaluating variables.

Remove route.conf man page statement that staticroute is enabled in
rc.conf since that's incorrect.

Wrap the staticroute while in parens, per <apb> & <christos>, and
quote all the arguments for the evals.
2012-05-02 15:57:15 +00:00
nakayama 81cae6fbb5 Avoid rebuilding services database every boot time.
The database has been renamed since the default was changed to CDB format.
2012-02-21 12:30:32 +00:00
joerg 410d0f4380 Import the new apropos/whatis.
This code has been developed by Abhinav Upadhyay as part of Google's Summer
of Code 2011. It uses libmandoc to parse man pages and builds a Full
Text Index in a SQLite database. The combination of indexing the full
manual page, filtering out stop words and ranking individual matches
based on the section gives a much improved user experience.

The old makewhatis and friends are kept under MKMAKEMANDB=no for now.
2012-02-07 19:13:24 +00:00
mbalmer 2e290c8200 For the sake of consistency with other scripts, output a full stop after the
word 'done'.  releng ok.
2012-02-07 10:36:01 +00:00
tsutsui a7f5216f76 Add an rc.d(8) script for isibootd(8). Taken from ndbootd(8). 2011-12-17 13:37:49 +00:00
tls 4924aa205a Load entropy at system boot (only works at securelevel < 1); save
at system shutdown.  Disable with random_seed=NO in rc.conf if desired.

Goes to some trouble to never load or save to network filesystems.

Entropy should really be loaded by the boot loader but I am still
sorting out how to pass it to the kernel.
2011-11-23 10:47:48 +00:00
darcy 77a099d5ff Allow pf flags to be specified in rc.conf.
Add default to defaults/rc.d as suggested by lukem@
2011-11-21 20:56:21 +00:00
apb b80ac66c04 Don't try to fsck root device if "/" is not mentioned in fstab.
Also don't assume that all network mounts are "nfs".
2011-09-20 12:13:21 +00:00
riz 6fc3b870af Create and install an rc.d file for devpubd - a daemon to listen
on drvctl and autocreate device nodes in /dev for those which don't have any.
Set the default to "NO" for now.
2011-09-06 21:32:29 +00:00
mbalmer d88fd18413 Terminate line with a '.', not the word 'done', for consistency with other
startup scripts.
2011-09-02 07:13:28 +00:00
uwe 53fc796546 Revert previous as it introduces "Circular dependency on provision
`mountcritremote'".

route6d is "BEFORE: NETWORKING" and was made to "REQUIRE: mountcritremote",
but mountcritremote "REQUIRE: NETWORKING".
2011-08-18 16:46:14 +00:00
gdt ef4e1527ca Make route6d REQUIRE: mountcritremote.
route6d is in /usr/sbin, and thus on systems with separate / and /usr,
/etc/rc.d/route6d can be run before /usr is mounted, resulting in
route6d mysteriously failing to start.
2011-08-17 16:39:29 +00:00
mbalmer a8d3ab0aa2 Print 'Keyboard encoding -> sg' instead of just 'encoding -> sg' on the
console.
2011-08-09 08:08:10 +00:00
christos 3c5f87c86e generate ecdsa key 2011-07-25 03:04:23 +00:00
plunky b41529f23b remove empty files 2011-06-18 18:43:41 +00:00
hans 21f62f04a1 remove -q argument, it is useless with Xorg and fails with XFree 2011-06-15 13:42:46 +00:00
plunky b52bb12959 provide a new 'bluetooth' rc.d script, to handle Bluetooth configuration
in a simpler manner. This replaces btattach, btconfig, bthcid, btdevctl
and sdpd scripts, and also should not require any configuration settings
other than "bluetooth=YES", though the full range of configurations is
still possible.
2011-05-27 09:28:41 +00:00
enami d89653b315 Unconfigure on shutdown so that component deivces are closed. 2011-04-05 02:52:27 +00:00
jmcneill 0cce2c7d9b put a : in an otherwise empty function, makes this script work with bash 2011-03-07 23:21:13 +00:00
jmcneill a58d526ab8 Add rc.d script to make sure the system fontconfig cache is up to date. 2011-02-18 00:42:20 +00:00
rmind 07ac07d35f NPF checkpoint:
- Add libnpf(3) - a library to control NPF (configuration, ruleset, etc).
- Add NPF support for ftp-proxy(8).
- Add rc.d script for NPF.
- Convert npfctl(8) to use libnpf(3) and thus make it less depressive.
  Note: next clean-up step should be a parser, once dholland@ will finish it.
- Add more documentation.
- Various fixes.
2011-02-02 02:20:24 +00:00
haad 7532abd112 Use chown now when it's available without /usr mounted. 2011-01-13 22:30:09 +00:00
kefren e0adf296c4 add ldpd rc script 2011-01-13 10:55:19 +00:00