- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: startup script
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-29-2008 10:03 PM
тАО05-29-2008 10:03 PM
Re: startup script
This script works fine but we have hardcoded the run level path.
Still i am not able to understand why this not executing under runlevel 2
thanks
shabir
PLATFORM=`uname`
#export ORACLE_HOME PATH
#
LOG=$ORACLE_HOME/stop1.log
touch $LOG
chmod a+r $LOG
#
case $1 in
'start')
echo "$0: starting up" >> $LOG
date >> $LOG
# Start Oracle Net
if [ -f $ORACLE_HOME/bin/tnslsnr ] ;
then
echo "starting Oracle Net Listener" >> $LOG 2>&1
#su - $ORACLE -c "lsnrctl start" >> $LOG 2>&1
fi
echo "Starting Oracle databases" >> $LOG 2>&1
echo $ORACLE $PATH "dbstart $ORACLE_HOME" >> $LOG 2>&1
which su >> $LOG 2>&1
#set -x
ORACLE_SID=cieho;export ORACLE_SID
# oracle owner at your site.
ORACLE=oracle
# CHANGED: PATH=${PATH}:$ORACLE_HOME/bin
ORACLE_HOME=/u01/app/oracle/OraHome_1;export ORACLE_HOME
ORACLE_HOME_LISTNER=/u01/app/oracle/OraHome_1;export ORACLE_HOME_LISTNER
#PATH=${PATH:-/usr/bin}:$ORACLE_HOME/bin
PATH=/usr/sbin:/bin:/usr/bin:/sbin:${PATH}:$ORACLE_HOME/bin
export PATH
HOST=`hostname`
PLATFORM=`uname`
#export ORACLE_HOME PATH
#
LOG=$ORACLE_HOME/stop1.log
touch $LOG
chmod a+r $LOG
#
case $1 in
'start')
echo "$0: starting up" >> $LOG
date >> $LOG
# Start Oracle Net
if [ -f $ORACLE_HOME/bin/tnslsnr ] ;
then
echo "starting Oracle Net Listener" >> $LOG 2>&1
#su - $ORACLE -c "lsnrctl start" >> $LOG 2>&1
fi
echo "Starting Oracle databases" >> $LOG 2>&1
echo $ORACLE $PATH "dbstart $ORACLE_HOME" >> $LOG 2>&1
which su >> $LOG 2>&1
su - $ORACLE -c "dbstart $ORACLE_HOME" >> $LOG 2>&1
;;
'stop')
echo "$0: shutting down" >> $LOG
date >> $LOG
# Stop Oracle Net
#set -x
ORACLE_SID=cieho;export ORACLE_SID
# oracle owner at your site.
ORACLE=oracle
# CHANGED: PATH=${PATH}:$ORACLE_HOME/bin
ORACLE_HOME=/u01/app/oracle/OraHome_1;export ORACLE_HOME
ORACLE_HOME_LISTNER=/u01/app/oracle/OraHome_1;export ORACLE_HOME_LISTNER
#PATH=${PATH:-/usr/bin}:$ORACLE_HOME/bin
PATH=/usr/sbin:/bin:/usr/bin:/sbin:${PATH}:$ORACLE_HOME/bin
export PATH
HOST=`hostname`
PLATFORM=`uname`
#export ORACLE_HOME PATH
#
LOG=$ORACLE_HOME/stop1.log
touch $LOG
chmod a+r $LOG
#
case $1 in
'start')
echo "$0: starting up" >> $LOG
date >> $LOG
# Start Oracle Net
if [ -f $ORACLE_HOME/bin/tnslsnr ] ;
then
echo "starting Oracle Net Listener" >> $LOG 2>&1
#su - $ORACLE -c "lsnrctl start" >> $LOG 2>&1
fi
echo "Starting Oracle databases" >> $LOG 2>&1
echo $ORACLE $PATH "dbstart $ORACLE_HOME" >> $LOG 2>&1
which su >> $LOG 2>&1
su - $ORACLE -c "dbstart $ORACLE_HOME" >> $LOG 2>&1
;;
'stop')
echo "$0: shutting down" >> $LOG
date >> $LOG
# Stop Oracle Net
if [ -f $ORACLE_HOME/bin/tnslsnr ] ;
then
echo "stopping Oracle Net Listener">> $LOG 2>&1
#su - $ORACLE -c "lsnrctl stop" >> $LOG 2>&1
fi
echo "stopping Oracle databases">>$LOG 2>&1
su - $ORACLE -c "dbshut $ORACLE_HOME" >> $LOG 2>&1
;;
# YOU NEED THIS AS WELL, as rc will supply this parameters:
start_msg) echo "starting oracle " ;;
stop_msg) echo "stopping oracle " ;;
*)
echo "usage: $0 {start[_msg]|stop[_msg}"
# SUPPLY AN EXIT CODE FOR exit
retcode=1
;;
# MISSING ESAC
esac
# USUALLY you work with a variable retcode (e.g.) in rc scripts
exit ${retcode:-0}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-30-2008 01:00 AM
тАО05-30-2008 01:00 AM
Re: startup script
Please clarify.
>Still i am not able to understand why this not executing under runlevel 2
please upload your /etc/rc.log for us to be able to investigate further
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-30-2008 07:01 AM
тАО05-30-2008 07:01 AM
Re: startup script
if your rc-scripts is in such a disorder as posted, I don't wonder, that it does not work.
If it's a corrupted posting, please retry.
If not, especially the PATH declerations must be moved to the top lines in the script before execution any commands.
I would merge the two start/stop sections into one to see clearer what is done in a start or a stop switch.
mfG Peter
PS: Still no time to submit points? We take time to answer questions ;-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-02-2008 10:18 AM
тАО06-02-2008 10:18 AM
Re: startup script
kindly find the rc.log
thanks
shabir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-02-2008 11:34 AM
тАО06-02-2008 11:34 AM
Re: startup script
63 entries
0 points
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-03-2008 12:19 AM
тАО06-03-2008 12:19 AM
Re: startup script
did you find any relevant output of S900dbora?
I did not - what should us be told?
Perhaps it's best to use am extra logfile for the error output of this script. Add at the beginning of the rc-script something like that:
exec 2>/tmp/dbora.stderr
set -x
Post the rc-script and the above logfile.
Next: you still did not answer my question about the rc-script.
mfG Peter
PS: Tim posted two numbers - don't mind, we do not give up soon, so the first number may grow. You are really the only one who can change the second number as well!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-11-2008 09:17 PM
тАО06-11-2008 09:17 PM
Re: startup script
I suppose that the application started is using sockets.
socket MUST NOT be used before rc3 S008net.init
else you may get a useless socket and the process may hang in some conditions.
So on hpux always start application using sockets after rc3.d/S008net.init
- « Previous
- Next »