Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1792
  • Last Modified:

AIX 4.3: How to run script at boot time

How do I run a script at boot time on an AIX system?

Thanks,
Charles
0
nevahj
Asked:
nevahj
1 Solution
 
shivsaCommented:
add script to /etc/inittab files.
check man pages for lsitab, chitab, mkitab, rmitab.
0
 
shivsaCommented:
You may want to put your commands in one of the files in the /etc/rc.d directory, such as /etc/rc.d/rc.local

You can add a line in /etc/rc.d/rc.local like this :

   su - www -c /path/to/script_File

Just change /path/to/script_File to the real path/file name.
0
 
shivsaCommented:
Save your script in somewhere on your system and edit the /etc/inittab file, to call the script.

You can have look at the following page for detail instructions:

http://www.cs.nott.ac.uk/TSG/manuals/databases/oracle/standard/a90346/post-ins.htm#1033413

this solution is same as first one but have example scripts in the link.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
gheistCommented:
wrap your script this way:

#!/bin/ksh
echo Starting script ....
/Your/code
echo ... script Done.
exit 0

some AIX tools expect zero error code from scripts, so better let it boot till it allows login, rather than get running to console whenever script failed
0
 
biraCommented:
In AIX i use to place the scripts in /etc/inittab , like this

tittle:2:once:/yourdir/yourscript.ksh

  The script will be executed once at boot time.

see man inittab
0
 
shivsaCommented:
need more help.....
0
 
nevahjAuthor Commented:
Thanks everyone, especially shivsa, for the help. I apologize for not replying sooner.

Shivsa, I appreciate your quick response but, I was looking for the non-technical answer that bira provided.

Thanks,
Charles
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now