Alexander, there is already SMF service for dtlogin: svc:/application/graphical-login/cde-login:default
The "standard" rc script for dtlogin - /etc/init.d/dtlogin - which you say you moved to other location, does pretty much this: case "$mode" in 'start') svcadm enable -rt application/graphical-login/cde-login:default ;; Tomas Alexander wrote: > Hello. I have Solaris 10 system wich runs dtlogin. I'd like to run it as SMF > service. For this reason I've made the file > /var/svc/manifest/application/dtlogin.xml and moved standard rc script for > dtlogin to /lib/svc/method/dtlogin.rc. > > But sometimes dtlogin exits and its service falls into state "online*". If I > set timeout of one minute it falls into "maintenance" state. In logs I see > the following: > > [ Mar 31 18:02:56 Executing stop method ("/lib/svc/method/dtlogin stop") ] > [ Mar 31 18:02:56 Method "stop" exited with status 0 ] > [ Mar 31 18:02:56 Executing start method ("/lib/svc/method/dtlogin start") ] > [ Mar 31 18:02:56 Method "start" exited with status 0 ] > [ Mar 31 18:02:56 Stopping because all processes in service exited. ] > [ Mar 31 18:02:56 Executing stop method ("/lib/svc/method/dtlogin stop") ] > [ Mar 31 18:02:56 Method "stop" exited with status 0 ] > [ Mar 31 18:02:56 Restarting too quickly, changing state to maintenance ] > [ Apr 1 09:45:48 Leaving maintenance because clear requested. ] //Turn on > service by hands > [ Apr 1 09:45:48 Enabled. ] > [ Apr 1 09:45:48 Executing start method ("/lib/svc/method/dtlogin start") ] > [ Apr 1 09:45:48 Method "start" exited with status 0 ] > [ Apr 1 09:55:31 Rereading configuration. ] > [ Apr 1 09:55:31 No 'refresh' method defined. Treating as :true. ] > [ Apr 1 09:58:22 Rereading configuration. ] > [ Apr 1 09:58:22 No 'refresh' method defined. Treating as :true. ] > [ Apr 1 10:07:14 Rereading configuration. ] > [ Apr 1 10:07:14 No 'refresh' method defined. Treating as :true. ] > [ Apr 1 12:45:24 Stopping because process dumped core. ] > [ Apr 1 12:45:24 Executing stop method ("/lib/svc/method/dtlogin.rc stop") ] > [ Apr 1 12:45:26 Method "stop" exited with status 0 ] > > > > dtlogin.xml: > <?xml version="1.0"?> > <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1"> > > <service_bundle type='manifest' name='dtlogin'> > <service > name='application/dtlogin' > type='service' > version='1'> > > <single_instance /> > > <instance name='default' enabled='false'> > <dependency name='loopback' > grouping='require_all' > restart_on='error' > type='service'> > <service_fmri value='svc:/network/loopback:default'/> > </dependency> > > <dependency name='physical' > grouping='optional_all' > restart_on='error' > type='service'> > <service_fmri value='svc:/network/physical:default'/> > </dependency> > > <dependent > name='dtlogin-user-server' > grouping='optional_all' > restart_on='none'> > <service_fmri value='svc:/milestone/multi-user-server' > /> > </dependent> > > <exec_method > type='method' > name='start' > exec='/lib/svc/method/dtlogin.rc start' > timeout_seconds='-1' /> > > <exec_method > type='method' > name='stop' > exec='/lib/svc/method/dtlogin.rc stop' > timeout_seconds='-1' /> > > <exec_method > type='method' > name='refresh' > exec='/lib/svc/method/dtlogin.rc reset' > timeout_seconds='-1' /> > > </instance> > > > <template> > <common_name> > <loctext xml:lang='C'> > dtlogin server > </loctext> > </common_name> > <documentation> > </documentation> > </template> > > </service> > </service_bundle> > > > This message posted from opensolaris.org > _______________________________________________ > smf-discuss mailing list > smf-discuss at opensolaris.org