Running a program on boot!


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Running a program on boot!
# 1  
Old 12-03-2002
Question Running a program on boot!

Hi there! I tried to search for something like this here but couldn't find anything. I need to run a specific program when linux starts up. I need to run it after the rp-pppoe has started because this prog needs internet connection.
I start the program by entering ./dynix start (its in my home dir), how do I make it start-up automatically?
TIA!!!
# 2  
Old 12-03-2002
this dependson your distro of linux. you need to edit your /etc/inittab this takes care of the default runlevel and then what to do at the different runlevels. however, for starting processes like what you want to do is to look at your rc.d files. certain systems just have one file, etc/rc.d , others though, like SuSE linux have an etc/rc.d directory, in this directory youw ill have multiple files, telling the system what to do on startup. if you provide your distro more advice can be given. hope this points you in the right direction!

--also when you find the right file on your system, all thats needed is just exactly what you would type from the command line.
# 3  
Old 12-04-2002
sorry, should have had mentioned the distro, its RedHat 7.3, so I have many different dirs under /etc/rc.d
# 4  
Old 12-04-2002
there might be a README file in /etc/rc.d/ and that file might tell you how things are being done. thats the way it is with SuSE though, im not sure if its the same or similar with redhat. good luck!
# 5  
Old 12-04-2002
In Redhat 7.3, the easiest way to do that would be to add it to the bottom of your /etc/rc.d/rc.local file. That's the last file that's run on startup.

Make sure to give it a full path, and it's also customary to make sure it's there and executable before trying to run it:
Code:
...
# Start Dynix
if [ -x /home/D-Lexy/dynix ]; then
      /home/D-Lexy/dynix start
fi
...

 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

How to keep program running after logout

Hello everyone. I am logged into a computer through ssh. I would like to run a program and have it keep running after I log out without screen (i forgot to run it). For example: ssh server user/comp~$ top & 12021 exit after that: ssh server user/comp~$ (something, maybe shell... (5 Replies)
Discussion started by: lepetal
5 Replies

2. Red Hat

Ethtool script not running on boot.

Hi, there is an incompatibility between my NIC and my Western Digital Powerline adapters which appears to cause autonegotiation to fail intermittently, most often following a reboot. Running the following Ethtool script will establish a connection immediately: #!/bin/sh # chkconfig: 345 85... (12 Replies)
Discussion started by: torley
12 Replies

3. UNIX for Dummies Questions & Answers

check service is running at boot

dears am having solaris 10, and i would like to know if the NTP service is running when the OS staritng?on the other hand how can i make it start at the boot up?note the ntp is managed by the SMF in solaris 10. thanks a lot (2 Replies)
Discussion started by: thehero
2 Replies

4. Shell Programming and Scripting

Running C# program problem

Hi All, How to run c# program using shell script ? (1 Reply)
Discussion started by: srikar.ch
1 Replies

5. Shell Programming and Scripting

Help with Running More than One Program

Folks, I'm really new to scripting and was wondering if you could help me out. I have the following script that I inherited: #!/bin/bash # # Usage # From the agent directory: # ./run-any-agent AgentName # TAC_AGENT_HOME=`pwd` LIB=${TAC_AGENT_HOME}/lib CLASSPATH=.... (17 Replies)
Discussion started by: DTriniWay
17 Replies

6. Filesystems, Disks and Memory

Compile a code for running on boot

How can I compile a code that can be runned on boot:?? (2 Replies)
Discussion started by: d4n1l0d
2 Replies

7. Programming

running a program for a specified time

how can i run a program for a specified time? i need to print a current time during program execution. (3 Replies)
Discussion started by: prosputko
3 Replies

8. UNIX for Dummies Questions & Answers

Running a program

Hi.Iam new to Linux.i got linux 7.0 pro and dont know how to run programs. I want a perl interputer and i know i installed one but how do i run it ??? Also how do i run a C or C++ editor ?and how do i run cron ? (3 Replies)
Discussion started by: perleo
3 Replies

9. Programming

running a c/c++ program in unix

This is not a question, but rather a simple how-to for programmers who are new to the UNIX environment. I too,am new to UNIX. First I developed a few programs on my box and perfected them until they were satisfactory for execution. Problem was however, that once i compiled and all that,... (2 Replies)
Discussion started by: kray
2 Replies

10. Shell Programming and Scripting

Running a program automatically

How can I make a program run automatically at a certain time of day? My problem is I need to make a small backup program that will back up a few files every day? (3 Replies)
Discussion started by: jvadn0
3 Replies
Login or Register to Ask a Question