Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/etc/rc.d Check for /dev/clockctl availability and print appr...



details:   https://anonhg.NetBSD.org/src/rev/a58c79e9dd0c
branches:  trunk
changeset: 533501:a58c79e9dd0c
user:      itohy <itohy%NetBSD.org@localhost>
date:      Tue Jul 02 14:47:22 2002 +0000

description:
Check for /dev/clockctl availability and print appropriate diagnosis if not.

diffstat:

 etc/rc.d/ntpd |  9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diffs (25 lines):

diff -r 053ba6977c2d -r a58c79e9dd0c etc/rc.d/ntpd
--- a/etc/rc.d/ntpd     Tue Jul 02 12:59:39 2002 +0000
+++ b/etc/rc.d/ntpd     Tue Jul 02 14:47:22 2002 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: ntpd,v 1.9 2002/06/18 14:35:39 lukem Exp $
+# $NetBSD: ntpd,v 1.10 2002/07/02 14:47:22 itohy Exp $
 #
 
 # PROVIDE: ntpd
@@ -36,6 +36,13 @@
        #       - The kernel has "pseudo-device clockctl" compiled in
        #       - /dev/clockctl is present
        #
+       if (: </dev/clockctl) 2>/dev/null; then
+               : exists and works
+       else
+               logger -s -p daemon.warning -t ntpd \
+                   "WARNING: not chrooting -- no working /dev/clockctl device"
+               return 0
+       fi
        if [ ! -c "${ntpd_chrootdir}/dev/clockctl" ]; then
                rm -f "${ntpd_chrootdir}/dev/clockctl"
                ( cd /dev ; /bin/pax -rw -pe clockctl "${ntpd_chrootdir}/dev" )



Home | Main Index | Thread Index | Old Index