From 5c4449b9717a6964b04f8e77bde6eb1d32c2c536 Mon Sep 17 00:00:00 2001 From: ckuethe <> Date: Wed, 14 Mar 2007 20:47:17 +0000 Subject: [PATCH] Allow nmeaattach to start a sensor before starting ntpd. Many modern receivers can cold start in the time it takes the boot process to get close to starting ntpd. Even if the gps is not ready or the fix is not valid, at least the sensor has been created; ntpd won't have to wait a few minutes before scanning for the sensor. This makes using GPS as the sole source of time a bit easier. ok deraadt --- src/etc/rc | 6 +++++- src/etc/rc.conf | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/etc/rc b/src/etc/rc index 4f37a9f9..45ea3c72 100644 --- a/src/etc/rc +++ b/src/etc/rc @@ -1,4 +1,4 @@ -# $OpenBSD: rc,v 1.301 2007/02/27 16:24:29 beck Exp $ +# $OpenBSD: rc,v 1.302 2007/03/14 20:47:17 ckuethe Exp $ # System startup script run by init on autoboot # or after single-user. @@ -403,6 +403,10 @@ if [ X"${timed_flags}" != X"NO" ]; then echo -n ' timed'; timed $timed_flags fi +if [ X"${nmeaattach_flags}" != X"NO" -a -n "${nmeaattach_flags}" ]; then + echo -n ' nmeaattach'; nmeaattach ${nmeaattach_flags} +fi + if [ X"${ntpd_flags}" != X"NO" ]; then echo -n ' ntpd'; ntpd $ntpd_flags fi diff --git a/src/etc/rc.conf b/src/etc/rc.conf index ca2726e3..fdc16a54 100644 --- a/src/etc/rc.conf +++ b/src/etc/rc.conf @@ -1,6 +1,6 @@ #!/bin/sh - # -# $OpenBSD: rc.conf,v 1.123 2007/02/27 16:21:29 beck Exp $ +# $OpenBSD: rc.conf,v 1.124 2007/03/14 20:47:17 ckuethe Exp $ # set these to "NO" to turn them off. otherwise, they're used as flags routed_flags=NO # for normal use: "-q" @@ -17,6 +17,7 @@ sshd_flags="" # for normal use: "" named_flags=NO # for normal use: "" rdate_flags=NO # for normal use: [RFC868-host] or [-n RFC2030-host] timed_flags=NO # for normal use: "" +nmeaattach_flags=NO # for normal use: "[options] cua-device" ntpd_flags=NO # for normal use: "" isakmpd_flags=NO # for normal use: "" sasyncd_flags=NO # for normal use: ""