![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Shutdown | aewpcoles | UNIX for Advanced & Expert Users | 6 | 08-03-2006 06:46 AM |
| Startup/Shutdown scripts | vincente | AIX | 1 | 05-23-2006 10:30 AM |
| Shutdown Scripts | zheng_soon | Shell Programming and Scripting | 4 | 07-08-2003 09:53 PM |
| rc scripts, do i need to kill them on shutdown? | kymberm | UNIX for Advanced & Expert Users | 1 | 02-10-2003 07:57 AM |
| to shutdown | rajashekaran | UNIX for Advanced & Expert Users | 2 | 02-18-2002 10:42 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Shutdown scripts
Hello all
I'm trying to automate the startup/shutdown of my database whenever the OS is bounced ... OS : Linux (Kernel : 2.4.20.-6) Oracle : 9.2.0.5 The contents of /etc/init.d/dbora file is listed below case "$1" in 'start') su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbstart" su - $ORACLE_OWNER -c "lsnrctl start LISTENER" su - $ORACLE_OWNER -c "agentctl start" ;; 'stop') su - $ORACLE_OWNER -c "agentctl stop" su - $ORACLE_OWNER -c "lsnrctl stop LISTENER" su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbshut" ;; *) echo $"Usage: $prog {start|stop}" exit 1 esac exit Contents of /etc/oratab is ORA920:/u01/app/oracle/product/9.2.0:Y I created all the required links ln -s /etc/init.d/dbora /etc/rc3.d/S99dbora ln -s /etc/init.d/dbora /etc/rc4.d/S99dbora ln -s /etc/init.d/dbora /etc/rc5.d/S99dbora ln -s /etc/init.d/dbora /etc/rc0.d/K10dbora ln -s /etc/init.d/dbora /etc/rc6.d/K10dbora I shutdown the Linux system using both init 6 and init 0 and in both cases the automation process started up the oracle instance but it did not shut the oracle instance down before shutting down Linux system.My S* scripts are working fine but not my K* scripts. Am I missing something here ? PS: There are 2 files in /etc/rc0.d and /etc/rc6.d , S00killall -> ../init.d/killall* S01reboot -> ../init.d/halt* Why are these S* scripts in rc0 and rc6 directories ...Seems to me like these S* scripts are getting executed before the K* scripts in in /etc/rc0.d and /etc/rc6.d ...but I'm not sure what is really going on here ... Thanks |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Some flavours of Linux have their own ideas about Startup and Shutdown scripts.
For example - on SuSE Linux, changing runlevel from, say, runlevel 5 to runlevel 0 involves executing the K* scripts in the runlevel 5 directory before it leaves runlevel 5 for runlevel 0, which is different to traditional *nix.... So what you'll need to do is execute Code:
ln -s /etc/init.d/dbora /etc/rc3.d/K10dbora ln -s /etc/init.d/dbora /etc/rc4.d/K10dbora ln -s /etc/init.d/dbora /etc/rc5.d/K10dbora Think about it like this (for SuSE Linux, anyways Cheers ZB |
||||
| Google The UNIX and Linux Forums |