Commit Graph

572 Commits

Author SHA1 Message Date
prlw1 68974b6b61 Apply modified version of patch from Wolfgang Stukenbrock in PR bin/41766
This forcibly unmounts tmpfs file systems, so that swapctl doesn't run
out of swap itself, eventually trying to kill pid 1.

No objections since:
  http://mail-index.netbsd.org/current-users/2015/03/16/msg026908.html
2015-04-20 18:01:46 +00:00
jmcneill f02362348e fix typo in previous; pass -y unconditionally to resize_ffs, not -p 2015-04-07 18:02:11 +00:00
jmcneill 906c0d847e add KEYWORD: interactive, honour resize_root_flags and resize_root_postcmd rc vars 2015-04-06 22:40:09 +00:00
mlelstv b68ba22239 Parse config file like ifconfig.if(5).
First word is always the module name, followed by options.
Load modules right after root filesystem is checked and before it
becomes writable.
2015-04-06 15:07:50 +00:00
chopps 94dff34741 Add resize_root boot operation. If resize_root=YES in rc.conf then
the system attempts to resize the root file system to fill it's
partition prior to mounting read-write. Useful for things like AMI
file system images. May eventually be used by arm images after
coming up with similar solution for increasing the parition size.
2015-03-30 10:58:37 +00:00
jmcneill 7ba4328bfa Process /etc/modules.conf (if present) at startup, before securelevel is
raised, to allow module loading on ports without a module aware bootloader.
2015-03-21 19:10:43 +00:00
joerg 88c9fb0be8 Add rc script for /sbin/iscsid. 2015-02-21 23:13:00 +00:00
jmcneill f1c95757e8 It doesn't make sense to start wpa_supplicant from an rc.d script without
the -B flag, so always prepend it to $rc_flags.
2015-01-22 19:50:21 +00:00
spz 1690f8559d new ntpd wants to be able to translate ntp into a port number after chroot,
so give it its own small copy of /etc/services in the chroot
2014-12-25 23:00:18 +00:00
christos bd08953ecc Add new keytype, replace duplicated code with loop 2014-10-19 16:33:01 +00:00
christos bad357ce4f fix syntax error 2014-10-14 20:49:47 +00:00
roy f68fe4cac7 Use checkyesnox to test rtsol as it has been removed including its
default configuration which we should not warn about.
2014-09-21 09:48:32 +00:00
roy f542fd2122 Don't try and install rc.d/rtsold 2014-09-11 18:01:22 +00:00
roy c6314d6139 Remove rtsol(8) and rtsold(8) as their functionality is in dhcpcd(8).
Remove rtsol(8) from rc.d/network.
Add -w seconds command to ifconfig to wait for N seconds for until DAD
has finished on all addresses.
Use ifconfig -w in rc.d/network instead of a forced sleep.

As discussed on tech-net@
2014-09-11 13:10:03 +00:00
wiz 7f6fa64667 'file system' for consistency with documentation (instead of 'filesystem'). 2014-07-22 17:11:09 +00:00
spz 652bd7d1b3 Create the dhcpd.leases file if it doesn't exist already, don't just
warn about it not being there.
Closes PR misc/48868
2014-07-17 07:17:03 +00:00
tls 916085404d Make named and the rest of BIND seed their RNG from /dev/urandom, not /dev/random. Better would be to rip the enormous gonkulating RNG machinery out of libisc entirely. Later. 2014-07-13 22:06:56 +00:00
spz 46ee6da10e create /etc/rndc.key on start if it doesn't already exist 2014-07-08 07:04:07 +00:00
uebayasi a270487d77 Indent. 2014-04-29 09:58:18 +00:00
uebayasi 4f67388957 Refactor a little to remove huge indents. 2014-04-29 09:56:16 +00:00
uebayasi 0db0bb3da5 Split huge monolithic functions for readability. 2014-04-29 09:42:51 +00:00
khorben cf10990721 Allow the extra command "reload" to dhcpcd's rc script, letting it reload
its configuration and rebind directly via the script.

LGTM roy@
2014-04-06 17:13:57 +00:00
spz 8797028bc7 - make etc/rc.d/wpa_supplicant create directory /var/run/wpa_supplicant
on startup
- create share/examples/wpa_supplicant/wpa_supplicant.conf and make it
  known in the relevant places. Improvements welcome, my point was
  ctrl_interface and "you seriously want this"
2014-01-23 07:26:50 +00:00
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