How to set up legacy services right on Solaris 10


 
Thread Tools Search this Thread
Operating Systems Solaris How to set up legacy services right on Solaris 10
# 1  
Old 01-03-2007
How to set up legacy services right on Solaris 10

I want to add auto startup and shutdown script to Solaris 10's legacy services as they run in Solaris 9 or in Linux.

To make this work, I created the crontrol script in /etc/init.d and then link it to /etc/rc0.d and /etc/rc2.d directories. rc0.d is for shutdown and rc2.d is for srat. After I reboot the Solaris 10 box, I went to /var/svc/log directory to check these log files: milestone-multi-user:default.log, rec5.log and so on. I have found that shutdown part in control script worked. But the startup part in the control script didn't work. The message was like: Excuting legacy init script "/etc/rc2.d/S99dbora", Oracle Startup: cannot start. In the next line, log file told me this: legacy init script "/etc/rc2.d/S99dbora" exited with return code 0. Why the second part of code in the same script worked (shutdown) and the first part (startup) didn't work? What is wrong on my settings? Anyone knows about this, please help. Thank you very much in advance.
# 2  
Old 01-03-2007
After the server has booted and Oracle has failed to start, does running the start scripts work ?

ie:
/etc/rc2.d/S99dbora start

Test this and if it does, maybe it needs to run via rc3 not rc2
Tornado
# 3  
Old 01-04-2007
Quote:
Originally Posted by Tornado
After the server has booted and Oracle has failed to start, does running the start scripts work ?

ie:
/etc/rc2.d/S99dbora start

Test this and if it does, maybe it needs to run via rc3 not rc2
Take also into account that, when booting, is root who run the scripts. Perhaps you need to run your script as another user (oracle, for instance)...

Regards.
# 4  
Old 01-04-2007
Tornado, grial:

Thanks so much for your advice. I have followed your instruction to test as:
/etc/rc2.d/S99dbora, returning message is: Oracle startup: cnanot start. Then I linked dbora to rc3.d as S99dbora and tested as /etc/rc3.d/S99dbora. I got the same message: Oracle startup: cannot start. Then I checked user to run the script. Since I created dbora as root user, etc - run by sys, rc2 - root, rc2.d - sys, rc3 -root, rc3.d - sys, S99dbora - root under rc2.d or rc3.d. These settings were generated by installation. Should I chown S99dbora to be run by oracle or group user dba? Thanks.
# 5  
Old 01-04-2007
Try to run it like this:
Code:
su - oracle -c "/etc/init.d/dbora start"

or whatever Oracle is run as.
You may want to create a "wrapper" script to do so...
# 6  
Old 01-04-2007
grial:

I run #su - oracle -c "/etc/init.d/dbora start". Returning message is: Ksh: /etc/init.d/dbora cannot execute. Because root is bash shell and oracle is korn shell, the dbora was created by root, not oracle. is this the reason? And what is the wrapper script?
# 7  
Old 01-04-2007
That's, most probably, a perms issue. Just chmod it to allow execution to the Oracle user.

A wrapper script, in your case, would be another script that calls the original one using "su". That new script is the one you would use to start/stop Oracle during the boot process. For example:
Code:
#!/bin/ksh
/usr/bin/su - oracle -c "/etc/init.d/dbora $1"

Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Solaris

NIS/smtp services issue on Solaris 11

Hi, Few services not starting on new build Solaris 11 non-global zone. I uninstalled zone and reinstalled and still same issue, while global zone is working fine. smpt service is going into maintenance mode and /var/svc/log/network-smtp:sendmail.log shows that it tries and then dead ... (0 Replies)
Discussion started by: solaris_1977
0 Replies

2. Solaris

Solaris 10 alternate ways of starting legacy scripts

Scenario: I have installed a service. When I start it by running /etc/init.d/<service> start it generates a massive amount of audit data (auditd) in /var/audit. So much so that running the service for any length of time is inadvisable due to overhead. However if I reboot the system the... (6 Replies)
Discussion started by: penguinpanzer
6 Replies

3. Solaris

Legacy Ultra60 with Solaris 5.7 SCSI device reverse engineering

I'm looking for help with a legacy system. I have some obsolete equipment connected to an Ultra 60 running Solaris 5.7 with the binary for a 32 bit driver. The driver is rejected by newer versions of solaris, which run 64 bit kernels. I hope to reverse engineer the driver so that I can... (0 Replies)
Discussion started by: obsoleteStuff
0 Replies

4. Solaris

Solaris 10 Services - Audit and Closure

Hello We have recently been through an audit of our solaris servers. All our solaris servers are running version 10. We have been told to close down all the services and we have closed what we could by using svcadm disable We only wish to let ssh and the ftp service to run. Below is a... (3 Replies)
Discussion started by: sollyshah
3 Replies

5. Solaris

DNS Services on Solaris

We need a DNS Server on DNS 10. What the best product can i buy and install ? Help me, pls. Tks all. (1 Reply)
Discussion started by: quan0509
1 Replies

6. Solaris

Remote services during Solaris installation

I've installed Solaris 10 (05-08) on a SPARC platform During the installation I was prompted with the question below. I selected yes to enable remote services. Does anyone know what services this option enables? - Enabling remote services ---------------------------------------- Would... (6 Replies)
Discussion started by: soliberus
6 Replies

7. UNIX for Advanced & Expert Users

services, solaris 10

dear all, i have 2 questions on solaris 10. I noticed telnet/ftp/print services suddenly being stopped on one server. How can i trace this issue and find a resolution. Other issue is i need to enable rsh within the same host. enabled the service rexec and have created the .rhosts and have a + in... (4 Replies)
Discussion started by: earlysame55
4 Replies

8. Cybersecurity

Unix Services (Solaris 9)

Our systems group is asking if it would be Ok to turn off certain services due to potention security risks. The following are being contemplated. Service chargen daytime discard dtspcd echo exec finger fs gssd in.comsat kcms_server ktkt_warnd login name rpc.cmsd rpc.metad... (4 Replies)
Discussion started by: BCarlson
4 Replies
Login or Register to Ask a Question