There are startup scripts provided in /etc/rc.d exactly for the purpose of running program(s) during the boot process.  These files are
    /etc/rc.d/rc#.d/S99local
where # is 2, 3, and 5
If you're running X, your final init-state is 5 and the last init-script that runs will be /etc/rc.d/rc5.d/S99local; if you're not running X, then it's 3 instead of 5..
 
You are free to hack up the requisite scripts.  Note too that if you're running X, the system still goes thru the 3-state before transitioning to 5 so you can even start a program before X-window starts if it's a console program.
 
Norman Dresner
Fellow Systems Engineer & SGI Laboratory Administrator
Radar Systems Engineering Department
Electronic Systems and Sensors Segment
Northrop Grumman Corporation
Baltimore-Washington International Airport
7323 Aviation Boulevard
Baltimore Maryland 21240
 
Voice: (410) 993 - 2096 Mornings; all-day voice-mail
 (410) 969 - 8068 Afternoons with answering machine
FAX: (410) 993 - 8084 On-site
 (410) 969 - 8068 Afternoons; call first to arrange
E-Mail: Mornings: [EMAIL PROTECTED]
 Afternoons: [EMAIL PROTECTED]
----- Original Message -----
Sent: Wednesday, February 21, 2001 11:54 AM
Subject: [rtl] init method

Hi,
this may not have to be a real-time question, but I am hoping someone knows the answer.  Someone told me that I can modify the file rc.sysinit so that I can have control of everything that happens when the machine boots.  Here is my ideal situation:
right after the machine is done booting and mounting the file systems, it goes and finds my program and runs it.  I would like my program to first get the current time down to a microsecnd, then "run it's function", then get the time again, and output the total execution time down to the nearest microsecond.  Then I dont care what happens after that.  I would like to make sure that nothing else could be running, like a daemon or something.  Is this the way to go or are there better ideas?
 
Thanks all,
 
Jeff

Reply via email to