Solved

AIX 4.3: How to run script at boot time

Posted on 2003-11-14
7
1,788 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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
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…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses

617 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