Exporting CLASSPATH in manifest service file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Exporting CLASSPATH in manifest service file
# 1  
Old 10-23-2008
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  
Old 10-24-2008
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  
Old 10-24-2008
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 Smilie
# 4  
Old 10-26-2008
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  
Old 10-27-2008
thank you very much
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Exporting Values of Variables to Another File

Hello, I'm very new to Linux, and I have a question, I'm hoping you could help me with. :) I have created a file called subject, contains this code: #!/bin/bash read -p "Student Name: " NAME read -p "Student ID: " ID read -p "Address: " ADDRESS I'm to create another file called... (7 Replies)
Discussion started by: iwant2learn
7 Replies

2. Shell Programming and Scripting

Exporting log file into Excel

Hi, I am using HP-UX. I have an output log file which gives me server statistics. I want to export the contents of the file(last 100 lines) using tail command and then save it into an excel file in my local machine. The server statistics should be collected every 3 hrs. So, i wanted the idea... (1 Reply)
Discussion started by: harshaganapathy
1 Replies

3. Solaris

SMF/Manifest in Zones

Hi.. I have an application installed in Zones and I would like to have the application started on every system reboot and stop at every shutdown. I created start/stop/restart script in /etc/init.d and placed S and K links in rc?d directories. This works fine. but I want to use SMF for this... (0 Replies)
Discussion started by: upengan78
0 Replies

4. Shell Programming and Scripting

Exporting variable from config file

Hi, I am exporting the environment variable from config file, but when I echo the variable it does not display any value. Here is the snippet of the code #!/bin/sh export ENVIRONMENT_ROOT_DIRECTORY="/cb/$ENVIRONMENT" echo $ENVIRONMENT_ROOT_DIRECTORY ${JAVA_HOME}/bin/java... (2 Replies)
Discussion started by: bhavnabakshi
2 Replies

5. Shell Programming and Scripting

exporting variabels from env file

I am running a unix script and calling an env script with in that. but the variables i am exporting in env are not being used by the present script. can any body let me know why? The env file is in the same directory and when i run in devug mode its able to show all the variable values also. ... (1 Reply)
Discussion started by: dsravan
1 Replies

6. Solaris

SMF - Adding instances to existing manifest

I have a default, sun supplied, apache2 install on solaris10. It's running fine, everything's great. I'm looking to add another instance, fairly happy with how to do that apart from one thing - the SMF manifest. Can i just edit the XML file sun supplied for the default apache2 and add in details... (2 Replies)
Discussion started by: craigp84
2 Replies

7. Shell Programming and Scripting

Exporting text file data to csv

Could any one help me in basic shell script to export text file data to csv. I need to export only particular data from text file to csv column. I am a newbie to UNIX could anyone help me with sample script code (3 Replies)
Discussion started by: l_jayakumar
3 Replies

8. Solaris

exporting a dmp file (oracle)from unix

i want to export a database (full schema) so that I can import the database to a windows 2000 server. The database is sitting on a unix-sun solaris box ver 8.. What are the commands... I am a bit rusty at unix at the moment! Cheers E (4 Replies)
Discussion started by: etravels
4 Replies
Login or Register to Ask a Question