View previous topic :: View next topic |
Author |
Message |
green_buddy Tux's lil' helper
Joined: 08 Jan 2003 Posts: 115 Location: Bay Area, CA
|
Posted: Tue Feb 25, 2003 3:54 pm Post subject: rc-script depends and env variables |
|
|
Hi everyone...
One of my rc-scripts depends on the JAVA_HOME environment variable which apparently isn't setup yet when the script is run in the default runlevel. What do I need to put in the depend clause of the rc-script so that the JAVA_HOME environment variable is setup and available for the script to use.
All java-based variables are defined in...
Thanks for any help with this!
-green |
|
Back to top |
|
|
herring Apprentice
Joined: 22 Jul 2002 Posts: 187 Location: Norway
|
Posted: Tue Feb 25, 2003 7:04 pm Post subject: Re: rc-script depends and env variables |
|
|
Take a look at start() in
Code: |
/usr/portage/app-sci/zetagrid/files/zetagrid.init
|
This script rips JAVA_HOME from profile.env |
|
Back to top |
|
|
herring Apprentice
Joined: 22 Jul 2002 Posts: 187 Location: Norway
|
Posted: Sat Mar 01, 2003 12:23 am Post subject: Re: rc-script depends and env variables |
|
|
Code: |
.
.
.
start() {
ebegin "Starting my rc-script"
JAVA_HOME="`/bin/grep -e "JAVA_HOME" /etc/profile.env | sed -e "s/^.*'\(.*\)'$/\1/"`"
export PATH=$PATH:$JAVA_HOME/bin
.
.
.
|
Anyone with a more graceful way of doing it ? |
|
Back to top |
|
|
|