CVSROOT:        /cvs
Module name:    src
Changes by:     k...@cvs.openbsd.org    2021/07/20 21:53:50

Modified files:
        distrib/miniroot: dot.profile 
        sbin/resolvd   : resolvd.c 
        sbin/slaacd    : slaacd.c slaacd.h 
        sbin/dhcpleased: dhcpleased.c dhcpleased.h 

Log message:
Use exclusive lock under /dev/, silence expected errors in installer

resolvd(8), slaacd(8) and dhcpleased(8) are different from other daemons
in that there must only be a single instance.

resolvd already does this, adjust slaacd and dhcpleased accordingly while
moving the lockfile paths under /dev/ such that they work early on boot and
don't run into races should /var be (un)mounted between daemon starts.

Locking is especially required in the installer where all three daemons are
started every time the "(I)nstall, (U)pgrade, (A)utoinstall or (S)hell? "
prompt is entered, i.e. restarting installation or dropping into a shell
and back into the prompt again would start multiple instances.

To avoid expected lockfile error messages in between installer prompts,
discard standard error when starting the autoconf daemons;  none of them
has other potential failure cases in installer mode before daemon(3)izing.

Input sthen deraadt
OK deraadt

Reply via email to