summaryrefslogtreecommitdiff
path: root/etc/rc
AgeCommit message (Collapse)Author
2023-04-26During boot we have a protective and restrictive pf ruleset during the timePeter Hessler
we are running netstart, and then load the pf.conf ruleset after all of the interfaces are loaded. Allow in and out IPv6 neighbor advertisement traffic without state during that time. suggestions/OK from saschan@ OK sthen@ kn@ florian@ deraadt@
2023-01-25Delete TAB only line.ASOU Masato
2023-01-18process the sshd random-relink kit if it is found. sshd's text segmentTheo de Raadt
is now garbled, and in the future xonly univirse you'll have poor success downloading it or libc to know where gadgets are. ok djm
2022-12-28Make wait_reorder_libs() honour library_aslr=NOKlemens Nanni
Otherwise it will unconditionally print an empty line in case relinking is disabled. Reported by kettenis Feedback OK tb OK florian
2022-12-26add newline missed in previousKlemens Nanni
2022-12-26Re-order libraries in parallel to netstart.Florian Obser
While netstart is busy setting up the network and waiting for a default route we can already start with reordering libraries since this does not depend on running network, speeding things up. Idea & input deraadt Input & OK kn
2022-11-28rc(8): reorder_libs: print names of relinked librariesScott Soule Cheloha
When booting from slow media, the boot can appear to stall at the "reordering libs" line for quite some time. For my example, my G4 PowerMac booting from USB 1.1 takes a full minute to reorder the libraries. Let's print the name of each library before it is relinked. This gives the operator a better sense of what the machine is doing. In particular, it signals to the operator that the machine did not hang. With input from kn@, deraadt@. Positive feedback from sthen@. Link: https://marc.info/?l=openbsd-tech&m=165914104421476&w=2 ok kn@
2022-08-29mount /usr earlier, to satisfy dynamically-linked daemons in /sbin betterTheo de Raadt
(there will be more soon)
2022-07-28Only attempt to set the yp domainname if not yet set; gets rid of an errorMiod Vallat
message at shutdown. tweaks & ok deraadt@
2022-07-27Place ypldap with ypserv, inside the $domainname check, since it alsoTheo de Raadt
has the same requirement.
2022-07-17/var/run/ypbind.lock doesn't need to be forcefully removedTheo de Raadt
ok aja
2022-07-11Generate P-256 ECDH keys for iked instead of reusing 2048 bit RSA keysTobias Heider
from isakmpd. ok bluhm@
2022-06-28Hook up bgplgd. Uses _bgplgd user with id 71:71 add a rc.d script andClaudio Jeker
all the other rc plumbing. OK deraadt@
2022-06-26Wait for autoconf interfaces to come up in netstart(8) instead ofFlorian Obser
rc(8). This makes tunnel interfaces work that depend on working autoconf interfaces. OK deraadt
2022-06-26Start network auto configuration daemons earlier so that tunnelFlorian Obser
interfaces can depend on dhcp or slaac. dhcpleased needs /var mounted so pull that up, we do not support /var on nfs. With & OK deraadt, earlier version OK sthen
2022-01-17filessystems -> filesystemsJonathan Gray
2021-11-11switch(4) and switchd(8) are retiering. Unhook them from variousClaudio Jeker
configuration files. OK sthen@ kn@ patrick@
2021-09-01quietly attempt mounting of /var/log early, in case someone creates suchTheo de Raadt
a partition to avoid /var overflow issues ok benno beck
2021-07-28A slightly less precise match on the ifconfig output lines worksTheo de Raadt
better for rdomain or metric tuned interfaces from leon fischer
2021-07-22Only perform the default-route-pause if there are interfaces with theTheo de Raadt
AUTOCONF flag set. This removes the delay for even more (strange) static configs. ok sthen
2021-07-22small tweak for default route checking, we don't care about the number ofStuart Henderson
routes, only if at least one exists, so can avoid the subshell and just use grep -q. ok deraadt
2021-07-22After netstart, dhcpleased, and resolved are running, spin up to 10Theo de Raadt
seconds waiting for a default route (v4 or v6) to exist, this increases the chance of DNS lookups working earlier. This is done before pf is configured, sorry we have good reasons. Static configurations are unaffected. dhclient previously did this kind of delay, and this is the lightest touch we can come up with which gives the same effect. While here, also start relinking earlier. ok benno florian sthen
2021-03-13because the kernel has been replaced after last boot, run kvm_mkdbTheo de Raadt
before the first consumer of kvm_bsd.db
2021-03-09dhcpleased wants /var (but contains code to handle when it isn't there).Theo de Raadt
But in the nfs diskless case, we can do better by starting it a little later. This disrupts nfs diskless on dynamic addresses a little, if it ever actually worked with dhclient, but anyone doing that deserves the headache. ok florian
2021-02-26Ship resolvd service, enable it by defaultkn
Starting right after unwind. OK deraadt
2021-02-26rc(8) bits for dhcpleased(8).Florian Obser
OK deraadt
2021-02-09rc: ensure that vfs.mounts.nfs check works without NFSChristian Weisgerber
If NFS isn't compiled into the kernel, sysctl -n vfs.mounts.nfs will produce no numerical output. Make sure that we always have a valid arithmetic expression. Reported by and ok patrick@
2020-11-29Add support for !command to mygate, so that netstart has a late opportunityTheo de Raadt
to perform network configuration (for example, "!route source -ifp em0") Split mygate and myname manual pages (how did anyone ever believe these are related), and perform hostname configuration much earlier in rc. discussed with benno, claudio, jmc, etc etc, last version of !command parser by tb
2020-01-24retire rebound etc bits to the atticTed Unangst
2019-11-11move /usr and var remounting (nfs diskless case...) earlier, so thatTheo de Raadt
unwind can be started (silently) before pf is configured (for those few weirdos who use hostnames in pf.conf...). Other unidentified concerns may be improved by this startup re-ordering, so let's give it a try. discussed with florian.
2019-11-10use $(<file) instead of $(cat file) since this script uses ksh; ok ajacoutot@Christian Weisgerber
2019-11-06we have emergency entropy injection code in rc, for if the bootblocks andTheo de Raadt
other methods failed to inject/churn the rng enough. Move it up far earlier. ok naddy sthen kettenis
2019-10-06for now, only mix in sysctl hw.{uuid,serialno,sensors} to /dev/random.Stuart Henderson
as found the hard way by d.rauschenb@gmail on an old fujitsu siemens machine, reading all of hw (notable hw.setperf) can have unexpected side-effects. ok deraadt
2019-10-02feed "sysctl hw" into /dev/random; a cheap way to feed in sensor dataStuart Henderson
as a one-shot at boot without more complex kernel work, and also includes some serial numbers/guids which may add a little more entropy e.g. for systems where /etc/random.seed may be known (e.g. cloned disk images). "why not" deraadt@
2019-05-10ld.so boot cleanup support:Philip Guenther
- put functions and data which are only used before calling the executable's start function into their own page-aligned segments for unmapping (only done on amd64, arm64, armv7, powerpc, and sparc64 so far) - pass .init_array and .preinit_array functions an addition argument which is a callback to get a structure which includes a function that frees the boot text and data - sometimes delay doing RELRO processing: for a shared-object marked DF_1_INITFIRST do it after the object's .init_array, for the executable do it after the .preinit_array - improve test-ld.so to link against libpthread and trigger its initialization late libc changes to use this will come later ok kettenis@
2019-04-01revert previous. ifconfig errors may be interesting... to be revisited.Ted Unangst
2019-04-01catch/hide errors from ifconfig carp in case there is no carp.Ted Unangst
ok deraadt
2019-02-24Remove -S from install commandskn
As of usr.bin/xinstall/install.c revision 1.68, -S is a no-op and install(1) will always create files safely, thus clean the option usage from the tree. Diff from Lauri Tirkkonen <lotheac at iki dot fi>, thanks.
2019-02-19Simplify NFS check in reorder_libs()kn
Loop over df(1)'s output directly, ensure the resulting list of block devices is unique to avoid later duplicity checks and redundant mount(8) invocations. This allows direct bail out on invalid types and simpler saving for later remount. OK deraadt
2019-01-26rc(8) bits for unwind(8); OK deraadtFlorian Obser
2019-01-24Drop the ttyflags message.Antoine Jacoutot
suggested by and ok deraadt@ ("I think we never hang there anymore")
2019-01-12Use acpidump -q to avoid message about ACPI information not being found.Mark Kettenis
Many arm64 systems use device trees instead of ACPI and acpidump is expectected to fail on those systems. And vmm(4) doesn't provide ACPI information either. ok deraadt@
2018-07-23It's time to switch to rad(8); tested by many.Florian Obser
Remove rtadvd(8) from rc(8). OK deraadt, phessler
2018-07-12rc(8) infrastructure for radFlorian Obser
2018-07-11Explicitly call "/etc/rc.d/vmd stop". This issues graceful shutdown commandsStuart Henderson
to running VMs (at least for OpenBSD ones), but the stop routine for system daemons is not usually called at shutdown. Earlier version with just "vmd stop" ok reyk@ kn@, ajacoutot@ reminded me to hide the contextless "vmd(ok)" text which looks bad, I did so and wrapped it with a "stopping VMs" message (it can take some time, especially when you have multiple VMs, so better to have some clear feedback).
2018-07-11Don't hide errors when IPv6 forwarding is not enabled.Florian Obser
OK(failed) phessler OK deraadt
2018-02-18Remove unecessary line continuation markers after || and &&Robert Peichaer
2018-02-10Load RFC 7217 key material and generate if it does not already exist.Florian Obser
Add soii.key to changelist (pointed out by semarie) and mtree/special (suggest by Craig Skinner). OK naddy, sthen, rpe, tb
2017-11-09kill trailing whitespace introduced in previous commitTheo Buehler
2017-11-06Use a variable for /usr/share/relinkRobert Peichaer
OK tb@