# Set ORA_HOME to be equivalent to the ORACLE_HOME
# from which you wish to execute dbstart and
# dbshut
# set ORA_OWNER to the user id of the owner of the
# Oracle database in ORA_HOME
ORA_HOME=/home/oracle/8.0.5.0.0
ORA_OWNER=oracle
if [! -f $ORA_HOME/bin/dbstart -o ! -d $ORA_HOME]
then
echo "Oracle startup: cannot start"
exit
fi
case "$1" in
'start')
# Start the Oracle databases:
su - $ORA_OWNER -c $ORA_HOME/bin/dbstart &
;;
'stop')
# Stop the Oracle databases:
su - $ORA_OWNER -c $ORA_HOME/bin/dbshut &
;;
esac
In the instructions, it then says:
Link dbora by entering:
# ln -s /etc/rc.d/init.d/dbora /etc/rc0.d/K10dbora
# ln -s /etc/rc.d/init.d/dbora /etc/rc2.d/S99dbora
.. this is where I am assuming it is set so that this dbora gets executed
on system boot.. correct?
Anyway, it doesn't work. First of all, I am logged in as root.
Second
of all, I am assuming the # signs in there are a mistake since they
are
comments in the bash shell. Third of all, if I just try:
ln -s /etc/rc.d/init.d/dbora /etc/rc0.d/K10dbora
It returns an error saying:
ln: cannot create symbolic link `/etc/rc0.d/K10dbora' to
'/etc/rc.d/init.d/dbora': No such file or directory
So, I tried a 'ls /etc/rc*' and I got:
init.d rc.local rc.sysinit
rc1.d rc3.d rc5.d
rc rc.news
rc0.d rc2.d
rc4.d rc6.d
... so, rc0.d IS there... so, THEN I tried: ls /etc/rc0.d and got:
ls: /etc/rc0.d: No such file or directory
huh?? why won't this work? does it or doesn't it exist?
drwxr-xr-x 10 root root
1024 Mar 17 10:41 .
drwxr-xr-x 26 root root
2048 Mar 19 15:36 ..
drwxr-xr-x 2 root root
1024 Mar 19 15:30 init.d
-rwxr-xr-x 1 root root
1871 Oct 15 11:07 rc
-rwxr-xr-x 1 root root
693 Oct 15 11:07 rc.local
-r-xr-x--- 1 news news
2082 Sep 10 1998 rc.news
-rwxr-xr-x 1 root root
7165 Oct 15 11:07 rc.sysinit
drwxr-xr-x 2 root root
1024 Mar 17 10:46 rc0.d
drwxr-xr-x 2 root root
1024 Mar 17 10:46 rc1.d
drwxr-xr-x 2 root root
1024 Mar 17 10:46 rc2.d
drwxr-xr-x 2 root root
1024 Mar 17 11:12 rc3.d
drwxr-xr-x 2 root root
1024 Mar 17 11:12 rc4.d
drwxr-xr-x 2 root root
1024 Mar 17 11:12 rc5.d
drwxr-xr-x 2 root root
1024 Mar 17 10:46 rc6.d
That made the command work... Oracle still won't auto-start, though.
Back to the drawing board.