Index: usr.sbin/bsdinstall/scripts/services =================================================================== --- usr.sbin/bsdinstall/scripts/services +++ usr.sbin/bsdinstall/scripts/services @@ -46,9 +46,10 @@ local_unbound "Local caching validating resolver" ${local_unbound:-off} \ sshd "Secure shell daemon" ${sshd_enable:-off} \ moused "PS/2 mouse pointer on console" ${moused_enable:-off} \ - ntpdate "Synchronize system and network time at bootime" \ - ${ntpdate_enable:-off} \ ntpd "Synchronize system and network time" ${ntpd_enable:-off} \ + ntpd_sync_on_start \ + "Synchronize system and network time at boot time" \ + ${ntpd_sync_on_start:-off} \ powerd "Adjust CPU frequency dynamically if supported" \ ${powerd_enable:-off} \ dumpdev "Enable kernel crash dumps to /var/crash" ${dumpdev:-on} \ @@ -56,8 +57,20 @@ exec 3>&- havedump= +haventpd= for daemon in $DAEMONS; do [ "$daemon" = "dumpdev" ] && havedump=1 continue + [ "$daemon" = "ntpd" ] && haventpd=1 + + if [ "$daemon" = "ntpd_sync_on_start" ]; then + if [ -z "$haventpd" ]; then + echo ntpd_enable=\"YES\" \ + >> $BSDINSTALL_TMPETC/rc.conf.services + fi + echo ntpd_sync_on_start=\"YES\" \ + >> $BSDINSTALL_TMPETC/rc.conf.services + fi + echo ${daemon}_enable=\"YES\" >> $BSDINSTALL_TMPETC/rc.conf.services done