Notice that my first attempt did not use SMF_IMMEDIATE. I just added that hopefully. I have now removed it again.
The output of svcs -l is: # svcs -l ntp fmri svc:/network/ntp:default name Network Time Protocol (NTP) enabled true state online next_state none state_time Tue May 01 09:59:39 2007 logfile /var/svc/log/network-ntp:default.log restarter svc:/system/svc/restarter:default contract_id 228 dependency require_all/error file://localhost/usr/sbin/ntpq (online) file://localhost/usr/sbin/ntpdate (online) dependency require_any/error svc:/network/service (online) The /var/svc/log/network-ntp:default.log has no entries in it from after the startup. The last line is: [ May 1 09:59:39 Method "start" exited with status 0 ] David Bustos wrote: > Quoth Brian Utterback on Tue, May 01, 2007 at 12:26:03PM -0400: >> Okay, I tried that, and smf never kills the process nor even puts it >> into maintenance status. Here is the code I have: >> >> /* enter the maintenance mode */ >> if ((fmri = getenv("SMF_FMRI")) != NULL) { >> if (0 > smf_maintain_instance(fmri, >> SMF_TEMPORARY|SMF_IMMEDIATE)) { >> >> printf("smf_maintain_instance:%s\n",scf_error()); >> exit(1); >> } >> /* sleep until SMF kills us */ >> while (1) { >> pause(); >> } >> } > > Don't use _IMMEDIATE. What does "svcs -l" report while you're sleeping? > What does your /var/svc/log file say? > > > David -- blu "When Congress started Daylight Savings Time earlier, did they even consider what affect an extra hour of daylight would have on global warming? Well, did they?" ---------------------------------------------------------------------- Brian Utterback - Solaris RPE, Sun Microsystems, Inc. Ph:877-259-7345, Em:brian.utterback-at-ess-you-enn-dot-kom