SUMMARY: "svcadm enable" for Next Reboot

From: Crist Clark <Crist.Clark_at_globalstar.com>
Date: Wed Feb 25 2009 - 13:46:58 EST
I got quite a few responses. Several suggested using
legacy rc*.d scripts. Yes, that is an option, but I was
asking about doing it all within SMF. A Darren Dunham
helped me with the piece I was missing.

The following works,

	# svcadm disable -t <FMRI>
	# svccfg -s <FMRI> setprop general/enabled=true

Running that first "disable -t" command, even though the
service is already disabled, tells the running SMF daemons
not to start it up when you change the "general/enabled"
property to "true." Precisely what voodoo does that, I am
not sure.

Also in my particular case, I could work around the problem.
The service in question, NTP, will fail to start and fall
into the "maintenance" state when started without the
/etc/inet/ntp.conf file. So, I could enable the service
without the configuration file, let it fall into maintenance,
and then put the configuration file in place. The system
will not clear the maintenance state without intervention
or a reboot, so I could get away without the explicit
temporary disable.

Thanks for all of the responses.

On 2/24/2009 at 12:39 PM, "Crist Clark" <Crist.Clark@globalstar.com> wrote:
> I hope this is an easy one. How do I enable a service to start
> at the next reboot, but I don't want to actually start it now
> in the Solaris 10 SMF?
>
> I don't see an option for "svcadm enable" for this. I tried
> to go in and just set the "general/enabled" property of the
> service to "true" using the "svccfg" command, but to my
> surprise, that actually tried to start the service just like
> "svcadm enable" would.
>
> Is there a way within SMF to do this gracefully?
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Wed Feb 25 13:47:22 2009

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:44:13 EST