The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Exporting variable from config file bhavnabakshi Shell Programming and Scripting 2 09-30-2008 12:13 PM
exporting variabels from env file dsravan Shell Programming and Scripting 1 11-30-2007 01:57 PM
SMF - Adding instances to existing manifest craigp84 SUN Solaris 2 10-01-2007 07:55 AM
Exporting text file data to csv l_jayakumar Shell Programming and Scripting 3 09-19-2005 12:27 AM
exporting a dmp file (oracle)from unix etravels SUN Solaris 4 02-05-2004 08:01 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-23-2008
Shreedhar Naik's Avatar
Shreedhar Naik Shreedhar Naik is offline
Registered User
  
 

Join Date: May 2008
Posts: 12
Exporting CLASSPATH in manifest service file

Hi,

I need the a help can please any one give me a suggestion for Exporting the CLASS PATH in service manifest file for Solaris 10

Here i have pasted the code

<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<!-- Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. ident "@(#) 1.0 07/12/10 SMI" -->

<service_bundle type='manifest' name='SGSN_Service'>
<service
name='application/SGSN_Service'
type='service'
version='1'>

<create_default_instance enabled='false' />
<single_instance />

<method_context>
<method_environment>
<envvar name="SGSN_STREAMBASE_HOME" value="/opt/SGSN/StreamBase" />
<envvar name="SGSN_HOME" value="/opt/SGSN" />
<envvar name="LD_LIBRARY_PATH" value="/opt/SGSN/StreamBase/lib" />
<envvar name="CLASSPATH" value="some path"
</method_environment>

</method_context>
<exec_method
type='method'
name='start'
exec='$SGSN_STREAMBASE_HOME/bin/sbd -f $SGSN_HOME/bin/sgsn.sbconf $SGSN_HOME/bin/sgsn-application.sbapp >> $SGSN_HOME/log/SGSN.log 2>&amp;1 &amp;'
timeout_seconds='60' />
<exec_method
type='method'
name='stop'
exec=':kill -TERM'
timeout_seconds='60' />
</service>

</service_bundle>



In the above code i want to write code to export the CLASSPATH
for this i have written like below:

<exec_method
type='method'
name='start'
exec='export $CLASSPATH'
exec='$SGSN_STREAMBASE_HOME/bin/sbd -f $SGSN_HOME/bin/sgsn.sbconf $SGSN_HOME/bin/sgsn-application.sbapp >> $SGSN_HOME/log/SGSN.log 2>&amp;1 &amp;'
timeout_seconds='60' />


But the above code also not working (I am not sure whether the above way is correct or not if anybody have some other way please let me know)

please tell me how can i do that

Last edited by Shreedhar Naik; 10-23-2008 at 10:45 AM.. Reason: more info about the issue
  #2 (permalink)  
Old 10-24-2008
Annihilannic Annihilannic is offline Forum Advisor  
  
 

Join Date: May 2008
Location: Sydney, Australia
Posts: 1,009
All of the environment variables in the method_environment section should be automatically exported, otherwise they would be pointless... so you shouldn't need to export CLASSPATH manually.
  #3 (permalink)  
Old 10-24-2008
Shreedhar Naik's Avatar
Shreedhar Naik Shreedhar Naik is offline
Registered User
  
 

Join Date: May 2008
Posts: 12
Thank you very much... your sol worked for me.
But i have one more issue .. Please let me know that how can I execute the Unix commands in manifest service file. I need to change the working directory. I need to execute the command 'cd /opt/SGSN/bin' is there any way for this?



Thanks In Advace
  #4 (permalink)  
Old 10-26-2008
Annihilannic Annihilannic is offline Forum Advisor  
  
 

Join Date: May 2008
Location: Sydney, Australia
Posts: 1,009
Try changing this line as follows:


Code:
exec='cd $SSGN_HOME/bin ; $SGSN_STREAMBASE_HOME/bin/sbd -f $SGSN_HOME/bin/sgsn.sbconf $SGSN_HOME/bin/sgsn-application.sbapp >> $SGSN_HOME/log/SGSN.log 2>&amp;1 &amp;'

  #5 (permalink)  
Old 10-27-2008
Shreedhar Naik's Avatar
Shreedhar Naik Shreedhar Naik is offline
Registered User
  
 

Join Date: May 2008
Posts: 12
thank you very much
Closed Thread

Bookmarks

Tags
unix commands

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:04 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0