HomeFreeBSD

bsdinstall: Fix ntpd_sync_on_start service option

Description

bsdinstall: Fix ntpd_sync_on_start service option

This installer option is currently totally useless, as it ends up
creating an ntpd_sync_on_start_enable="YES" entry in rc.conf, not an
ntpd_sync_on_start="YES" entry, as is the correct name. This can also be
noticed by revisiting the services menu, which parses the previously
written rc.conf.services file to set variables governing the default
menu entry values so that selecting OK regenerates the same file, as the
menu entry will use the correct variable name and thus think the entry
was not selected last time, defaulting back to off and losing the
setting.

Thus, add a special case in the loop for this option. The only other
entry that doesn't follow the *_enable pattern is dumpdev (even moused
does, it just also sets a second variable), but that also deviates in
terms of being explicitly set either way and using AUTO rather than YES,
hence why ntpd_sync_on_start follows a different pattern here and is
special-cased rather than introducing a whole new variable that governs
behaviour outside the loop.

Fixes: c153a35bfd71 ("bsdinstall: replace ntpdate by ntpd_sync_on_start")

Details

Provenance
jrtc27Authored on Nov 29 2022, 12:57 AM
Parents
rGbc928800723b: bhyve: Avoid passing a possible garbage pointer to free().
Branches
Unknown
Tags
Unknown