RichS wrote:While Oracle Linux 6.2 now uses upstart, the chkconfig mechanism still works for legacy scripts. You can use a mixture of both legacy SysV init scripts and upstart scripts. In fact, there are a bunch of things in OL6 that still use legacy SysV init scripts, Apache being an easy example.
While Oracle Linux 6 is out (6.2 actually), Oracle has yet to get everything 'working out of the box' with 6.2. Right now (June 2012) you've got to download patches from Oracle, the new way to start services in Linux 6, upstart, doesn't work with all Oracle features yet, etc.
Because of the above, I've been using Oracle Linux 5.8, the terminal release of the Oracle Linux 5 line.Also, Oracle Linux 5.8 is not the terminal release of the Oracle Linux 5 line: I expect there will be at least another release (5.9) as both Red Hat and Oracle have extended the production lifecycle to 10 years. The end of the production lifecycle for RHEL5 (and thus Oracle Linux 5) is March 2017.
You do not need to start your Oracle instance before starting dbconsole. So there is no need for the "sleep" routine. You can start the Oracle Database control console even when the instance is down:
lockfile=/var/lock/subsys/oracleEM ... start) su $ORA_OWNER -c "$ORA_HOME/bin/emctl start dbconsole &" &>/dev/null touch $lockfile ;; stop) su $ORA_OWNER -c "$ORA_HOME/bin/emctl stop dbconsole" rm -rf $lockfile ;; ...