Can this line be a script/ be automated? [Solved]
Posted: Mon Jun 18, 2012 3:32 pm
I use Mobile Broadband, and there is currently a bug where the Huawei E173 dongle has to be kicked awake each boot with this terminal command before I can get online:
sudo modprobe usbserial vendor=0x12d1 product=0x1c10
I was thinking it must be possible to automate this in a simple script, or maybe it's even easier than that. In Mint 11 and 12/Ubuntu 11.04 and 11.10 this dongle worked fine without meddling.
This was maybe insanely naive, but I made a file called startdongle.sh with this in it:
#!/bin/sh
modprobe usbserial vendor=0x12d1 product=0x1c10
Then I moved that into the file system with the sudo mv command and changed the permissions with the sudo chmod u+x command and added this moved file to the startup programs (maybe this last step was unnecessary anyway?). I have only had one attempt at scripting before, which failed and frustrated enough to keep me away from it from then, but I've become curious again. I imagine this is stupidly easy to regular bash people - one little line. Presumably there is something about the form of the line which means the module can't be invoked with these parameters where they normally are in the filesystem.
Hopefully I haven't caused anyone's ribs to crack laughing... All help appreciated. Thanks.
sudo modprobe usbserial vendor=0x12d1 product=0x1c10
I was thinking it must be possible to automate this in a simple script, or maybe it's even easier than that. In Mint 11 and 12/Ubuntu 11.04 and 11.10 this dongle worked fine without meddling.
This was maybe insanely naive, but I made a file called startdongle.sh with this in it:
#!/bin/sh
modprobe usbserial vendor=0x12d1 product=0x1c10
Then I moved that into the file system with the sudo mv command and changed the permissions with the sudo chmod u+x command and added this moved file to the startup programs (maybe this last step was unnecessary anyway?). I have only had one attempt at scripting before, which failed and frustrated enough to keep me away from it from then, but I've become curious again. I imagine this is stupidly easy to regular bash people - one little line. Presumably there is something about the form of the line which means the module can't be invoked with these parameters where they normally are in the filesystem.
Hopefully I haven't caused anyone's ribs to crack laughing... All help appreciated. Thanks.