Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

services start automatically in AIX

Status
Not open for further replies.

imad77

Instructor
Oct 18, 2008
97
0
0
CA
Hi,

I'm a newbie in AIX 5.3 and I'm working to define the services that start automatically after a reboot.

In RedHat, we can look in /etc/rc.d/rc5.d or /etc/rc.local or /etc/inittab by example for level 5.

But in AIX, I checked the content of /etc/rc.d/rc5.d and there are nothing there.
I checked /etc/inittab and /etc/rc.local and I did not find the service that I'm looking for.

Is there a way to detect the path or tool where the services are started automatically?

Thanks,

Imad
 
You can do this the same way you are doing it in RHEL.

You can either put it in /etc/inittab or /etc/rc.d/rc2.d (as the default runlevel in aix is 2)

Regards,
Khalid
 
Have a look here for more info:



Code:
Create /etc/rc.d/rc2.d/Src.local and /etc/rc.d/rc2.d/Krc.local shell scripts owned by root.system with 550 permissions. Src.local will be invoked by AIX just after AIX boots up and Krc.local will be invoked by AIX just before AIX shuts down. Write the scripts carefully and test them thoroughly to make sure they will not hang under any circumstances. 

See the Run level script execution article in the AIX V5.3 Operating system and device management manual for more information regarding run level scripts. 

Note: This is one of the few exceptions to the Don't store local files in / and /usr best practice, which should be documented in /usr/local/README or equivalent, as suggested in the best practice. 

Note: Execution of run level scripts is driven by the l2:2:wait:/etc/rc.d/rc 2 line in /etc/inittab. If run level scripts do not get invoked at AIX boot time, confirm that the line is still there. And please note that if a run level script hangs, the AIX boot process will hang at that line in /etc/inittab waiting for the run level script to finish.

Man page for /etc/inittab:


To create an entry in /etc/inittab it is recommended to use mkitab (instead of editing the file):


Regards,
Khalid
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top