Solved

AIX 4.3: How to run script at boot time

Posted on 2003-11-14
7
1,786 Views
Last Modified: 2010-04-21
How do I run a script at boot time on an AIX system?

Thanks,
Charles
0
Comment
Question by:nevahj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 24

Expert Comment

by:shivsa
ID: 9751027
add script to /etc/inittab files.
check man pages for lsitab, chitab, mkitab, rmitab.
0
 
LVL 24

Expert Comment

by:shivsa
ID: 9751500
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
 
LVL 24

Expert Comment

by:shivsa
ID: 9751516
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!

 
LVL 62

Expert Comment

by:gheist
ID: 9759510
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
 
LVL 6

Accepted Solution

by:
bira earned 50 total points
ID: 9763387
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
 
LVL 24

Expert Comment

by:shivsa
ID: 9801007
need more help.....
0
 
LVL 2

Author Comment

by:nevahj
ID: 10071395
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

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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question