Please support VectorLinux!

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

Cariboo

  • Vectorite
  • ***
  • Posts: 289
To run script at boot time [SOLVED]
« 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 »
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, 10: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, 12:46:22 am by M-ake »
Jumalauta!!
--
Fish go m00!

exeterdad

  • Packager
  • Vectorian
  • ****
  • Posts: 2046
Re: To run script at boot time
« 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.

Cariboo

  • Vectorite
  • ***
  • Posts: 289
Re: To run script at boot time
« 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:  :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, 04:15:10 pm by Cariboo »
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, 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"
 ;)
Life is full of setbacks; Success is measured by the way you deal with them!