components/ntp/patches/60-exit-message.patch
author Brian Utterback <brian.utterback@oracle.com>
Fri, 20 Sep 2013 08:55:17 -0700
branchs11-update
changeset 2789 b28fe4d7df32
permissions -rw-r--r--
15705382 SUNBT7031289 Update ntp to 4.2.7 15722546 SUNBT7055402 ipmp cause reachability issues for ntp4 daemon 15727250 SUNBT7064417 ntpd errors on some new system 15751447 SUNBT7106031 Solaris 11 restrict noserve doesn't work right 15785388 SUNBT7161189 ntpd starts on S 11 in a forked status with error "ntpd indicates n 15813516 SUNBT7195495 ntpd crashed with SIGFPE (Arithmetic Exception) 16090481 ntp version 4 daemon crashes in isc_interfaceiter_first() 16741686 "ntpd" v4.2.5 cannot accept/query interface names longer than 15 characters. 16978017 ntpd debug in Solaris 11.1does not write any output 17000189 NTP needs to increase its file descriptor limit. 17000601 ntpd should log a message when it exits abnormally.

See: 

	http://bugzilla.ntp.org/show_bug.cgi?id=2410


--- ntpd/ntp_proto.c
+++ ntpd/ntp_proto.c
@@ -1856,23 +1856,27 @@ clock_update(
 	 * Clock exceeds panic threshold. Life as we know it ends.
 	 */
 	case -1:
+		msyslog(LOG_ERR, "Clock offset exceeds panic threshold.");
 #ifdef HAVE_LIBSCF_H
 		/*
 		 * For Solaris enter the maintenance mode.
 		 */
 		if ((fmri = getenv("SMF_FMRI")) != NULL) {
 			if (smf_maintain_instance(fmri, 0) < 0) {
-				printf("smf_maintain_instance: %s\n",
+				msyslog(LOG_ERR, "smf_maintain_instance: %s\n",
 				    scf_strerror(scf_error()));
 				exit(1);
 			}
 			/*
 			 * Sleep until SMF kills us.
 			 */
+			msyslog(LOG_ERR, "%s placed into maintenance. "
+			    "Set system clock by hand before clearing.", fmri);
 			for (;;)
 				pause();
 		}
 #endif /* HAVE_LIBSCF_H */
+		msyslog(LOG_ERR, "Set system clock by hand.");
 		exit (-1);
 		/* not reached */