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!

Auto start scripts on AIX

Status
Not open for further replies.

MCubitt

Programmer
Mar 14, 2002
1,081
0
0
GB
Hi

Where should I place a call to a script so that it runs when the AIX box is started? The script would start a vnc server service and is run as root.

Should the script live in any particular place?

Thanks



There's no need for sarcastic replies, we've not all been this sad for that long!
 
As per my posting in the General Unix forum
Use initab
The details are too long to go into here but 'man inittab' will give details
Another AIX like action is to use rc.local but his is called from inittab
On our system
Code:
rclocal:2:wait:/etc/rc.local >/dev/console 2>&1
This means that rc.local is run when the box gets to run level 2, processing will wait until rc.local has finished, and the command that is run is /etc/rc.local >/dev/console 2>&

Columb Healy
Living with a seeker after the truth is infinitely preferable to living with one who thinks they've found it.
 
Strangely man inittab reaped nothing, "Manual entry for inittab not found or not installed."


Luckily Google was more helpful.

Thanks


There's no need for sarcastic replies, we've not all been this sad for that long!
 
Inittab is not a command, then there is no entry in man.
Use vi /etc/inittab to edit and add new entry.
 
man init gives some info on inittab, but as you say Google is your friend.
 
Sorry you didn't find the man entry for inittab. It does work on my (AIX 5.1 ML6) machine which is why I recommended it.

Columb Healy
Living with a seeker after the truth is infinitely preferable to living with one who thinks they've found it.
 
will this work for subsystems as well, like the ntp daemon?

# startsrc -s xntpd
0513-059 The xntpd Subsystem has been started. Subsystem PID is 37550.

i suppose that i don't know the distinction between a service and a subsystem.

thanks,

jeff

 
xntpd is usually started from the /etc/rc.tcpip script. Make sure the line

start /usr/sbin/xntpd "$src_running"

in the /etc/rc.tcpip script is uncommented. But there's nothing stopping you from starting it from inittab, as long as it is started in the correct sequence. I'd start it from the rc.tcpip script.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top