Results 1 to 10 of 12
This always works...
Code:
sudo modprobe floppy
I put that in a file named "other". I put that in /bin, gave myself all permissions and if I type "other" in ...
- 05-06-2009 #1Just Joined!
- Join Date
- Apr 2009
- Posts
- 39
how do include a script at bootup?
This always works...
I put that in a file named "other". I put that in /bin, gave myself all permissions and if I type "other" in the console the floppy will get mounted... if I could just get rid of that pesky password prompt for sudo...Code:sudo modprobe floppy
I looked through the man modprobe...I did not see anything on this. But, it's always possible I miised it. and lastlyis there any way to have the script answer the PW request?
Any thoughts are appreciated, and thanks in advance.where can I put this command or the script to make it start at bootup, like autoexec or config.sys in the DOS days?
- 05-06-2009 #2
Ok, well first off what Distro do you have?
Since loads of Distros allow you to add a modprobe to the config... After that if also kinda depents your distro. if you have a /etc/rc.d/ folder go read the files in there. Sometimes I see /etc/init.sh its kinda diffrent on a lot of Distros..
Next from that I'd love to point at you that Password-less sudo modprobe is quite dangerous from a Security point of view
I hope this kinda helps you.
But for a more direct answer I'd need to know your Distro.
Sorry
- 05-06-2009 #3
I'll assume you are in Ubuntu as this is an Ubuntu help section (@Robin
)
The simple answer is that you create your script and put it in /etc/init.d then you run "sudo update-rc.d <your script name> defaults" without the quotesIf we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)
My new blog. It's probably not as good as I think it is.
- 05-06-2009 #4Just Joined!
- Join Date
- Apr 2009
- Posts
- 39
RobinVossen,
I am in the Ubuntu forum, therefore my question is related to Ubuntu.
I thought of that before I asked the question. Ultimately, it is is up to me to make the decision to take a chance on a security breach on my computer.Next from that I'd love to point at you that Password-less sudo modprobe is quite dangerous from a Security point of view
Obviously, it is your option to answer or not. Regardless of your choice, it certainly is not your responsibility to make sure I follow security policies on my system.
- 05-06-2009 #5Just Joined!
- Join Date
- Apr 2009
- Posts
- 39
elija, thank you for your helpful reply!
I will try that, but would you please explain what I'm doing so I can learn from this?create your script and put it in /etc/init.d then you run "sudo update-rc.d <your script name>
Also, I am assuming there is a space between the word "update" and "-rc.d", so it looks like "update -rc.d", is that correct? Thanks again!
- 05-06-2009 #6
/etc/init.d is the directory where your startup scripts actually live.
sudo update-rc.d <your script name> defaults
This command will create the symlinks in the directories rc0.d - rc6.d which equate to the different run levels.
You can get more information by running "man update-rc.d"If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)
My new blog. It's probably not as good as I think it is.
- 05-06-2009 #7Just Joined!
- Join Date
- Apr 2009
- Posts
- 39
elija:
Thanks for explaining that. Tried it, here are the results.
flop (the script) is in init.df
I tried the command in both relative and absolute:Code:joe@joe-desktop:~$ ls /etc/init.d/f* /etc/init.d/firestarter /etc/init.d/flop
What am I doing wrong? Do I need NN SS KK after the "defaults", whatever that is?Code:joe@joe-desktop:~$ sudo update-rc.d flop > defaults usage: update-rc.d [-n] [-f] <basename> remove update-rc.d [-n] <basename> defaults [NN | SS KK] update-rc.d [-n] <basename> start|stop NN runlvl [runlvl] [...] . -n: not really -f: force joe@joe-desktop:~$ sudo update-rc.d /etc/init.d/flop > defaults usage: update-rc.d [-n] [-f] <basename> remove update-rc.d [-n] <basename> defaults [NN | SS KK] update-rc.d [-n] <basename> start|stop NN runlvl [runlvl] [...] . -n: not really -f: force joe@joe-desktop:~$
Thanks again
- 05-07-2009 #8
i believe you can just ad your module to the end of /etc/modules
sudo gedit /etc/modules
add the name of the module you want to load (not ur script) to the end of the file, save, the next reboot should automatically load you
r module
- 05-07-2009 #9Just Joined!
- Join Date
- Apr 2009
- Posts
- 39
brokndodge, thanks for your reply.
However I don't understand. What do you mean by "module"? I have a script I want to execute at boot time. I don't know anything about modules.
Please keep your answer simple so I can understand. Although I am getting better, I still know next to nothing about Linux.
Thanks again.
- 05-07-2009 #10Just Joined!
- Join Date
- Apr 2009
- Posts
- 39
problem solved , thank you!
elija,
Your idea works!
Thanks so much for your help.... a nice easy solution
Your patience and clear explanations are appreciated
Thank You


Reply With Quote