- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Run script when bootup
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
тАО07-09-2003 11:55 PM
тАО07-09-2003 11:55 PM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-10-2003 12:03 AM
тАО07-10-2003 12:03 AM
Re: Run script when bootup
put your script in /sbin/init.d
i.e. /sbin/init.d/dbstartup
an then make a symbolic link from /sbin/rc2.d
/sbin/rc2.d/S570dbstartup -> /sbin/init.d/dbstartup
This will startup the database whenever the system enters run-level 2.
Regards
Rainer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-10-2003 12:08 AM
тАО07-10-2003 12:08 AM
Re: Run script when bootup
/usr/share/doc called start_up.txt
this should explain it all for you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-10-2003 12:14 AM
тАО07-10-2003 12:14 AM
Re: Run script when bootup
1. copy and create script on /sbin/init.d (from /sbin/init.d/template)
2. Create symbolic links to the script in the appropriate run-level script directories, as follows:
# ln -s /sbin/init.d/script_name /etc/rc0.d/K10script_name
# ln -s /sbin/init.d/script_name /etc/rc3.d/S99scipt_name
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-10-2003 12:18 AM
тАО07-10-2003 12:18 AM
Re: Run script when bootup
#!/usr/bin/sh
#
#export all the path variables you want
#
#
case "$1" in
"start_msg") echo "Starting Oracle dababase" ;;
"start") /path/to/script/dbstart ;;
"stop_msg") echo "Stoping oracle database" ;;
"stop") /path/to/script/dbstop ;;
*) echo "Usage: myscript start | stop" ;;
esac
exit 0
Name the script something (myscript here) and put it in /sbin/init.d directory with 555 permisions.
Go to /sbin/rc3.d if you want it to start on runlevel 3 and make a softlink to the above script named S999oracledb for example. The S means that the script should start in this runlevel. The number is the sequence of executing the scripts.
To have the database shutdown automatically when you rebbot or shuting the system down, make a softlink to the script in /sbin/rc2.d or rc1.d and name it Kxxxoracledb. K stands for kill or stop. xxx is again the sequence. Make sure you run it (and stop the database) BEFORE other important things stop running.
hope it helps,
Nikos
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-10-2003 12:20 AM
тАО07-10-2003 12:20 AM
Re: Run script when bootup
#!/bin/ksh
case "$1" in
start_msg)
echo "run startup_script"
;;
start)
(add startup script here)
;;
stop_msg)
echo "run shutdown_script"
;;
stop)
(add shutdown script here)
;;
esac
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-10-2003 01:13 AM
тАО07-10-2003 01:13 AM
Re: Run script when bootup
This question was answered fully (scripts inclusive) in http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x3ce99276484dd611abdb0090277a778c,00.html
My search was : "oracle sbin"
Regards,
Tom Geudens
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-10-2003 01:18 AM
тАО07-10-2003 01:18 AM
Re: Run script when bootup
but what is the meaning of the code "S570" in Rainer von Bongartz 's example , in my system , there are some other codes like S900 , S780 , what code should i use ? thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-10-2003 01:34 AM
тАО07-10-2003 01:34 AM
Re: Run script when bootup
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-10-2003 06:54 AM
тАО07-10-2003 06:54 AM
Re: Run script when bootup
Like the folks earlier stated it's all in /usr/share/start_up.txt
Later