how to run a terminal-command during startup

Asked by pepperblue

I have a simple problem.
I have a VIA CLARITY IIA USB modem (Well, a wireless telephone connected to my system through a USB cable). Each time i boot into ubuntu, i have to make it detect using this command: sudo /sbin/modprobe usbserial vendor=0x15eb product=0x001
and i had included it in 'startup' option but is asking to enter the password each time it boot. I need a script or something that it would be useful if i could run it during the boot-up process that i dont need to enter my password. Otherwise please tell me how to run a terminal command during boot-up without enter a pasword.. I googled, but didnt get a proper answer.

YASH!!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu linux Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
Last query:
Last reply:
Revision history for this message
Best actionparsnip (andrew-woodhead666) said :
#1

You need to add an option in a file in /etc/modprobe.d

If you run:

gksudo gedit /etc/modprobe.d/usbserial.conf

and add the line:
options usbserial vendor=0x15eb product=0x001

Then save the new file, and close gedit, the options will be used at boot as wel as if you re-modprobe it later

Revision history for this message
pepperblue (ayashif) said :
#2

This is also a great way. Actually, i got it in another way. I added the line /sbin/modprobe command in init.d, and it worked. I just gave it a try, i did not expect it, but worked. Thank you, for your reply Mr. actionparsnip. Now i knew how to use the usbserial in another way, thanks again :)

And, by mistake i created a duplicate of this question; due to my slower internet, at first browser stopped in the middle, i refreshed the page once again.. This is the reason. Sorry. How can i remove the duplicate entry?

Revision history for this message
pepperblue (ayashif) said :
#3

Thanks actionparsnip, that solved my question.

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#4

Seems there are no more duplicate entry in all your answered questions... https://answers.launchpad.net/~ayashif