components/ntp/patches/60-exit-message.patch
changeset 1467 f14b6c5766ca
equal deleted inserted replaced
1466:24d2be32f88c 1467:f14b6c5766ca
       
     1 See: 
       
     2 
       
     3 	http://bugzilla.ntp.org/show_bug.cgi?id=2410
       
     4 
       
     5 
       
     6 --- ntpd/ntp_proto.c
       
     7 +++ ntpd/ntp_proto.c
       
     8 @@ -1856,23 +1856,27 @@ clock_update(
       
     9  	 * Clock exceeds panic threshold. Life as we know it ends.
       
    10  	 */
       
    11  	case -1:
       
    12 +		msyslog(LOG_ERR, "Clock offset exceeds panic threshold.");
       
    13  #ifdef HAVE_LIBSCF_H
       
    14  		/*
       
    15  		 * For Solaris enter the maintenance mode.
       
    16  		 */
       
    17  		if ((fmri = getenv("SMF_FMRI")) != NULL) {
       
    18  			if (smf_maintain_instance(fmri, 0) < 0) {
       
    19 -				printf("smf_maintain_instance: %s\n",
       
    20 +				msyslog(LOG_ERR, "smf_maintain_instance: %s\n",
       
    21  				    scf_strerror(scf_error()));
       
    22  				exit(1);
       
    23  			}
       
    24  			/*
       
    25  			 * Sleep until SMF kills us.
       
    26  			 */
       
    27 +			msyslog(LOG_ERR, "%s placed into maintenance. "
       
    28 +			    "Set system clock by hand before clearing.", fmri);
       
    29  			for (;;)
       
    30  				pause();
       
    31  		}
       
    32  #endif /* HAVE_LIBSCF_H */
       
    33 +		msyslog(LOG_ERR, "Set system clock by hand.");
       
    34  		exit (-1);
       
    35  		/* not reached */
       
    36