Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
How to cerate Solaris 10 manifest XML script for RC program - Beginner Question
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
underh20.scubadiv...@gmail.com  
View profile  
 More options Mar 25 2009, 7:08 pm
Newsgroups: comp.unix.solaris, comp.unix.admin, comp.unix.misc
From: underh20.scubadiv...@gmail.com
Date: Wed, 25 Mar 2009 16:08:34 -0700 (PDT)
Local: Wed, Mar 25 2009 7:08 pm
Subject: How to cerate Solaris 10 manifest XML script for RC program - Beginner Question
Dear Sir/Madam,

I need to create my own manifest XML script and establish service to
run the following RC script "S100nddarpip" in /etc/rc3.d directory.
Unfortunately, I am getting errors when trying to import the xml file,
even though the script validates OK.   Could anyone shed some light on
what is wrong in the XML file and how to get rid of the error
messages ?  Thanks,  Bill

# cat /etc/rc3.d/S100nddarpip

ndd -set /dev/arp arp_cleanup_interval 60000
ndd -set /dev/ip ip_ire_arp_interval 60000

# cat /var/svc/manifest/site/ndd.xml

<?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/
service_bundle.dtd.1'>
<service_bundle type='manifest' name='export'>
  <service name='system/ndd' type='service' version='0'>
    <create_default_instance enabled='true'/>
    <single_instance/>
    <exec_method name='start' type='method' exec='/etc/rc3.d/
S100nddarpip' timeout_seconds='60'>
      <method_context/>
    </exec_method>
    <exec_method name='stop' type='method' exec=':kill'
timeout_seconds='60'>
      <method_context/>
    </exec_method>
  </service>
</service_bundle>

# svccfg validate ndd.xml
#

# svccfg -v import ndd.xml
svccfg: Temporary service "TEMP/system/ndd" must be deleted before
this manifest can be imported.
svccfg: Import of ndd.xml failed.  Progress:
svccfg:   Service "system/ndd": not reached.
svccfg:     Instance "default": not reached.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
guzzijason  
View profile  
 More options Mar 26 2009, 12:17 am
Newsgroups: comp.unix.solaris, comp.unix.admin, comp.unix.misc
From: guzzijason <jasonwtuc...@gmail.com>
Date: Wed, 25 Mar 2009 21:17:28 -0700 (PDT)
Local: Thurs, Mar 26 2009 12:17 am
Subject: Re: How to cerate Solaris 10 manifest XML script for RC program - Beginner Question
On Mar 25, 7:08 pm, underh20.scubadiv...@gmail.com wrote:

First, you're getting an error that you need to delete TEMP/system/ndd
first. Do that.

   # svccfg delete TEMP/system/ndd

Second, if you *really* want to make this an SMF service, move the
script out of the rc3.d directory (or it will run twice) and put the
following in your manifest:

        <property_group name='startd' type='framework'>
                <propval name='duration' type='astring'
value='transient' />
        </property_group>

If you don't SMF will probably keep trying to restart the ndd script
each time it exits, which is not what you want. (see the svc.startd
man page for more info on that).

Personally, I don't think there is any benefit to running an 'ndd'
script as an SMF serviceat all. All you need to do is put your rc
script in place in /etc/rc3.d/S100nddarpip (which you've already
done). Each time the system boots, it will load SMF services and then
legacy init scripts (which is what you have). Don't even worry about
svccfg or importing a manifest - you don't need it in this case.

Normally, you would just execute an ndd command at boot, and never
again after that. In this case, it's a good candidate to be run as a
legacy script. SMF is really useful in cases when you have a daemon
process that you need to start up and keep running. SMF can
automatically restart those processes if they go down. SMF also helps
if your service has important dependencies that need to be in place
before it runs. Your script doesn't seem to need these features.

Also, if you want your init script to run last, naming it
"S100nddarpip" won't accomplish that. S100... would be executed first,
most likely. If you want to see what order the scripts will run in,
simply cd to /etc/rc3.d and run 'ls -1'. The order that the scripts
are listed is the same order that they will run. If you want to make
sure it runs last, best to name it "S99nddarpip" or something like
that.

__Jason


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »