VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

Author Topic: To run script at boot time [SOLVED]  (Read 1883 times)

Cariboo

  • Vectorite
  • ***
  • Posts: 289
To run script at boot time [SOLVED]
« on: May 06, 2008, 10: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, 09: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
Re: To run script at boot time
« Reply #1 on: May 06, 2008, 11:22:27 pm »

You can try adding that command to the rc.local file by running following command as root
Code: [Select]
echo "martian_modem" >> /etc/rc.d/rc.local
Reboot and post here how it goes.

Edit: fixed a typo
« Last Edit: May 07, 2008, 01:46:22 am by M-ake »
Logged
Jumalauta!!
--
Fish go m00!

exeterdad

  • Packager
  • Vectorian
  • ****
  • Posts: 2046
Re: To run script at boot time
« Reply #2 on: May 07, 2008, 04: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
Re: To run script at boot time
« Reply #3 on: May 07, 2008, 09: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:  :o
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
 ::)
So, it seems that the driver is started before the actual boot is finished!
 ???
« Last Edit: May 08, 2008, 05: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
Re: To run script at boot time
« Reply #4 on: May 18, 2008, 09: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"
 ;)
Logged
Life is full of setbacks; Success is measured by the way you deal with them!