Operating System - Linux
1829103 Members
2254 Online
109986 Solutions
New Discussion

Re: The db subsytems startup through rc config

 
SOLVED
Go to solution
John Jayaseelan
Super Advisor

The db subsytems startup through rc config

Hi,

The generic script for starting & stopping the db through the 'start' & 'stop' parameter is available on /sbin/rc.d directory. But the parameter is not passed, how the db could start automatically.

Thanks
4 REPLIES 4
Steven E. Protter
Exalted Contributor

Re: The db subsytems startup through rc config

Linux. HP-UX uses /bin/rc#.d and /sbin/init.d

Here is how it works.

in /etc/rc5.d or 3 or 4 depending on the run level you want.

You have a soft link to a start stopscript in /etc/init.d

Example

You want to auto start oracle, start run level 5, stop run level 4

cd /etc/rc5.d

ln -s /etc/init.d/oracle S89oracle

Capital S starts it

cd /etc/rc4.d

ln -s /etc/init.d/oracle K11oracle

the script /etc/init.d/oracle you have to usually write yourself, though recent releases of oracle actually provide this.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Roberto Polli
Trusted Contributor

Re: The db subsytems startup through rc config

Which linux are you using?

on Redhat you better use
#chkconfig
and
#services
to manage bootup services.

Pls. check in this forum: you'll find almost all you need to know.
John Jayaseelan
Super Advisor

Re: The db subsytems startup through rc config

Hi,

The O/S is HP-UX.

The scrip on /sbin/init.d for the db startup is linked to /sbin/rc#.d/S###dbstart.

But the issue is the script can only start/stop the database based on the parameter being passed. So how the parameter is is sent to the script?

Thanks
Roberto Polli
Trusted Contributor
Solution

Re: The db subsytems startup through rc config

Hi,
I think you post your quest to the wrong forum, anyway
/sbin/rc does the following:

init_list "Starting subsystems for run-level $new"
get_scripts ${new} S |
while read name descrip; do
if [ -s "$name" ]; then
add_list "$name start" "$descrip"
found=1
fi
done

which runs each script taken from
get_scripts() {
state=$1
mode=$2
dir=/sbin/rc${state}.d
ls $dir 2>/dev/null |
while read name
do
case $name in
${mode}*)
path=$dir/$name
if [ "$mode" = "S" ]; then
desc=`$path start_msg`
elif [ "$mode" = "K" ]; then
desc=`$path stop_msg`
fi
echo $path $desc
esac
done
}



man rc

more /sbin/rc

Peace, R.