VectorLinux
November 28, 2014, 10:59:32 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: To run script at boot time [SOLVED]  (Read 1741 times)
Cariboo
Vectorite
***
Posts: 289



« on: May 06, 2008, 09:21:02 pm »

I have a Dell Inspiron 2500 Laptop which has a WinModem installed.
To activate the driver, each time I want to dial/connect, I have to run the command
"martian_modem"
I wonder if there is a possibility to run "martian_modem" at boot time,
so that it is running as long as the computer is ON?
I googled "run script at boot time" but was not successful.
Can somebody help me?

« Last Edit: May 18, 2008, 08:58:02 pm by Cariboo » Logged

Life is full of setbacks; Success is measured by the way you deal with them!
M-ake
Member
*
Posts: 92


« Reply #1 on: May 06, 2008, 10:22:27 pm »

You can try adding that command to the rc.local file by running following command as root
Code:
echo "martian_modem" >> /etc/rc.d/rc.local

Reboot and post here how it goes.

Edit: fixed a typo
« Last Edit: May 07, 2008, 12:46:22 am by M-ake » Logged

Jumalauta!!
--
Fish go m00!
exeterdad
Packager
Vectorian
****
Posts: 2046



« Reply #2 on: May 07, 2008, 03:16:01 am »

Just make sure "martian_modem" is in your path.  Or use M-ake's solution with the full path to the script.
Logged
Cariboo
Vectorite
***
Posts: 289



« Reply #3 on: May 07, 2008, 08:12:14 am »

Thank you guys,
I'm still working on it and try to understand what I would have to do.
I found THIS
and there I found I would have to enter the command line here: /etc/rc.d/rc.S
I'll keep you posted.


EDIT May 8, 2008
More Info:  Shocked
The command/program I want to start at boot time is 'martian_modem'.
It starts the driver for a Lucent/Agere DSP WinModem.
When I enter this command with code: echo "martian_modem" >> /etc/rc.d/rc.local
boot does not finish.
The last line on the screen is: martian: info: Your port is /dev/ttySM0
 Roll Eyes
So, it seems that the driver is started before the actual boot is finished!
 Huh
« Last Edit: May 08, 2008, 04:15:10 pm by Cariboo » Logged

Life is full of setbacks; Success is measured by the way you deal with them!
Cariboo
Vectorite
***
Posts: 289



« Reply #4 on: May 18, 2008, 08:57:12 pm »

Problem solved...case closed....

to start the modem driver at boot time I entered:
1) In /etc/rc.d/rc.local:
"/usr/sbin/martian_modem &" ( '&' for running the module in the background)
2) in /etc/rc.d/rc.modules:
"/sys/module/martian_dev"
 Wink
Logged

Life is full of setbacks; Success is measured by the way you deal with them!
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!