Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > Your Distro > Mandriva Linux Help > how to make a command run at startup?

Forgot Password?
 Mandriva Linux Help   For help and discussion about Mandriva (formally Mandrake) Linux.

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds


Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Reply
 
Thread Tools Display Modes
Old 03-31-2005   #1 (permalink)
Just Joined!
 
Join Date: Jan 2005
Posts: 9
how to make a command run at startup?

Could anyone please let me know how i can initialise my dial-up modem on startup without having to go to another run-level and type in slmodemd to initialise it before it can work? Thanks, Rob.
r.schmuecker is offline  


Reply With Quote
Old 03-31-2005   #2 (permalink)
Linux Guru
 
lakerdonald's Avatar
 
Join Date: Jun 2004
Location: St. Petersburg, FL
Posts: 5,039
place a shell script to do it in /etc/init.d and place a symlink to it in /etc/rc5.d (assuming that's your default level)
__________________
the lost art of found sound
lakerdonald is offline   Reply With Quote
Old 03-31-2005   #3 (permalink)
Just Joined!
 
Join Date: Jan 2005
Posts: 9
Ah laker donald!! You come to my aid again, it was you who helped me install the relevant modem software just after new-year when i fist started with linux and i had a lot of trouble getting it to go online in the first place. Thanks again. Please could you tell me how to make a shell script that would do the job or of anywhere where i can learn this? Also i am using mandrake 10 is RC5 my run-level? My graphical one comes up once i press ctrl-alt 7. is that then my run-level? Thanks for your tolerance of an amateur!

Cheers,

Rob
r.schmuecker is offline   Reply With Quote
Old 03-31-2005   #4 (permalink)
Linux Guru
 
lakerdonald's Avatar
 
Join Date: Jun 2004
Location: St. Petersburg, FL
Posts: 5,039
okay, make a file (let's call it modem-init), and open it up in a text editor.
type in:
Code:
#!/bin/bash
then press enter and enter the commands necessary to initialize the modem, seperating each command with a newline.
then move that file to /etc/init.d as root, and type:
Code:
chmod +x /etc/init.d/modem-init
ln /etc/init.d/modem-init /etc/rc5.d/modem-init
and you should be fine.
__________________
the lost art of found sound
lakerdonald is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 10:35 PM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2