Results 11 to 15 of 15
So when red hat is booting, as which user do the services start
It starts with root user permissions.
But again,simply placing variable in /etc/profile should work.
Post your /etc/profile ...
- 10-09-2008 #11
It starts with root user permissions.So when red hat is booting, as which user do the services start
But again,simply placing variable in /etc/profile should work.
Post your /etc/profile here ..- Lakshmipathi.G
-------------------
FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-------------------
- 10-09-2008 #12Just Joined!
- Join Date
- Sep 2008
- Posts
- 10
If that is so then why do i have to su - root to get it to show my $LD_LIBRARY_PATH values:It starts with root user permissions.
[root@localhost ~]# echo $LD_LIBRARY_PATH
[root@localhost ~]# su - root
[root@localhost ~]# echo $LD_LIBRARY_PATH
/orabin/oracle/10.2_client/lib
[root@localhost ~]#
Here's my /etc/profile
# /etc/profile
# System wide environment and startup programs, for login setup
# Functions and aliases go in /etc/bashrc
pathmunge () {
if ! echo $PATH | /bin/egrep -q "(^|
$1($|
" ; then
if [ "$2" = "after" ] ; then
PATH=$PATH:$1
else
PATH=$1:$PATH
fi
fi
}
# ksh workaround
if [ -z "$EUID" -a -x /usr/bin/id ]; then
EUID=`id -u`
UID=`id -ru`
fi
# Path manipulation
if [ "$EUID" = "0" ]; then
pathmunge /sbin
pathmunge /usr/sbin
pathmunge /usr/local/sbin
fi
# No core files by default
ulimit -S -c 0 > /dev/null 2>&1
if [ -x /usr/bin/id ]; then
USER="`id -un`"
LOGNAME=$USER
MAIL="/var/spool/mail/$USER"
fi
HOSTNAME=`/bin/hostname`
HISTSIZE=1000
if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
INPUTRC=/etc/inputrc
fi
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC
for i in /etc/profile.d/*.sh ; do
if [ -r "$i" ]; then
. $i
fi
done
ORACLE_HOME=/orabin/oracle/10.2_client; export ORACLE_HOME
JAVA_HOME=/usr/local/java/jdk1.6.0_04/jre; export JAVA_HOME
LD_LIBRARY_PATH=$ORACLE_HOME/lib; export LD_LIBRARY_PATH
PATH=$PATH:/usr/sbin:$HOME/bin:$ORACLE_HOME/bin:$LD_LIBRARY_PATH; export PATH
unset i
unset pathmunge
if ! echo ${LD_LIBRARY_PATH} | /bin/fgrep -q "/orabin/oracle/10.2_client/lib"
then
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH":/orabin/oracle/10.2_client/lib"
fi
- 10-14-2008 #13
I believe the answers might be this statement,
Instead of whole 'if' part , try this one just comment out three linesif ! echo ${LD_LIBRARY_PATH} | /bin/fgrep -q "/orabin/oracle/10.2_client/lib"
then
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH":/orabin/oracle/10.2_client/lib"
fi
exclude the assignment.
If commenting out these lines didn't work,then then you will need debug -place echo statements with /etc/profile like echo given below,# if ! echo ${LD_LIBRARY_PATH} | /bin/fgrep -q "/orabin/oracle 10.2_client/lib"
#then
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH":/orabin/oracle/10.2_client/lib"
#fi
Important take backup of /etc/profile before editing,all the best
/etc/profile
# ksh workaround
if [ -z "$EUID" -a -x /usr/bin/id ]; then
EUID=`id -u`
UID=`id -ru`
fi
# Path manipulation
if [ "$EUID" = "0" ]; then
pathmunge /sbin
pathmunge /usr/sbin
pathmunge /usr/local/sbin
fi
# No core files by default
ulimit -S -c 0 > /dev/null 2>&1
if [ -x /usr/bin/id ]; then
USER="`id -un`"
LOGNAME=$USER
MAIL="/var/spool/mail/$USER"
fi
HOSTNAME=`/bin/hostname`
HISTSIZE=1000
if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
INPUTRC=/etc/inputrc
fi
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC
for i in /etc/profile.d/*.sh ; do
if [ -r "$i" ]; then
. $i
fi
done
ORACLE_HOME=/orabin/oracle/10.2_client; export ORACLE_HOME
JAVA_HOME=/usr/local/java/jdk1.6.0_04/jre; export JAVA_HOME
LD_LIBRARY_PATH=$ORACLE_HOME/lib; export LD_LIBRARY_PATH
PATH=$PATH:/usr/sbin:$HOME/bin:$ORACLE_HOME/bin:$LD_LIBRARY_PATH; export PATH
unset i
unset pathmunge
if ! echo ${LD_LIBRARY_PATH} | /bin/fgrep -q "/orabin/oracle/10.2_client/lib"
then
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH":/orabin/oracle/10.2_client/lib"
fi
echo "Displaying Values..."
echo $ORACLE_HOME
echo $JAVA_HOME
echo $LD_LIBRARY_PATH
echo $PATH
- Lakshmipathi.G
-------------------
FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-------------------
- 10-14-2008 #14Just Joined!
- Join Date
- Sep 2008
- Posts
- 10
HI
Ok problem solved!!!!
this is what i tried and it seems to work:
In my root home created a file called cache_start.sh and cache_stop.sh
touch cache_start.sh
touch cache_stop.sh
in these files i put:
ccontrol start cache
and
ccontrol stop cache quietly
respectively
then in my service i put the following:
start)
echo -n ""
echo "Starting cache: "
su - $CACHE_USR -c "/home/cache_start.sh"
RETVAL=0
echo
[ $RETVAL = 0 ] && touch /var/lock/subsys/cashier
;;
stop)
echo -n "Stopping cache: "
su - $CACHE_USR -c "/home/cache_stop.sh"
RETVAL=0
echo
[ $RETVAL = 0 ] && rm -f /var/lock/subsys/cashier
;;
restart)
And it seems to work, don't ask me why
I dont need anything special in my /etc/profile
To LakshmiPathi.G a great big thank you for your patience and help!
If i new u i would be buying u a beer right now!
- 10-15-2008 #15- Lakshmipathi.G
-------------------
FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-------------------


Reply With Quote

