People,
I'm trying to create a service that will start at boot (in single-user mode, actually). I am up and running but I do NOT want to run the service now. I only want to run the service when the machine reboots.
I've been rummaging around all day trying to figure this out but I'm stuck. I can create a service that runs. I can create an XML file in /var/svc/manifest/site/patch-install.xml that will be read when I boot- because after I boot, I can list the service:
svcs -a | grep patch
disabled 18:23:23 svc:/site/patch-install:default
I have inserted the following in my xml:
<create_default_instance enabled='true' />
and also
<create_default_instance enabled='false' />
but it makes no difference. Anyone have any idea? What is the purpose of create_default_instance? I don't understand; item 9 on
http://www.sun.com/bigadmin/content/selfheal/sdev_intro.html seems rather opaque to me.
Also, what exactly is the purpose of /var/svc/profile/ ? I tried putting some code to enable my xml but it didn't do anything. Just wondering if this might fit into the picture.
BTW, I do not want the login prompt to appear until my method is complete.
Thanks.
-mschwage
Here fyi is my /var/svc/manifest/site/patch-install.xml file:
<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<service_bundle type='manifest' name='Patches:patch-install'>
<service
name='site/patch-install'
type='service'
version='1'>
<create_default_instance enabled='false' />
<single_instance />
<dependent
name='patch-install_single-user'
grouping='require_all'
restart_on='none'>
<service_fmri value='svc:/milestone/single-user' />
</dependent>
<exec_method
type='method'
name='start'
exec='/var/tmp/S92delay'
timeout_seconds='86400' />
<exec_method
type='method'
name='stop'
exec=':true'
timeout_seconds='0' />
<property_group name='startd' type='framework'>
<propval name='duration' type='astring' value='transient' />
</property_group>
<stability value='External' />
<template>
<common_name>
<loctext xml:lang='C'>
Install patchset upon boot.
</loctext>
</common_name>
</template>
</service>
</service_bundle>