Command on Start up

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read this

Command on Start up

Postby Holland1994 on Fri Feb 22, 2013 10:23 am

I have one last question though, how to implent a start up command like: sudo modprobe p54pci.
I put it in my rc.local, but it woudn't work.
This is how it looks like:

Code: Select all
CODE: SELECT ALL
#!/bin/sh -e                                                                       
#                                                                                 
# rc.local                                                                         
#                                                                                 
# This script is executed at the end of each multiuser runlevel.                   
# Make sure that the script will “exit 0″ on success or any other                 
# value on error.                                                                 
#                                                                                 
# In order to enable or disable this script just change the execution             
# bits.                                                                           
#                                                                                 
# By default this script does nothing.                                             
                                                                                   
sudo modprobe p54pci


Any suggestions?
Holland1994
Level 1
Level 1
 
Posts: 8
Joined: Thu Jan 31, 2013 6:56 am

Linux Mint is funded by ads and donations.
 

Re: Command on Start up

Postby eanfrid on Fri Feb 22, 2013 10:35 am

1/ sudo will not work here (rc.local is already executed by root)
2/ in order to load modules on demand you only have to complete the file "/etc/modules" with the additional module names (i.e p54pci) you want to load at boot time, one per line
Main desktop: Debian GNU/Linux Wheezy 64bit w/custom 3.14 longterm kernel - MATE 1.8.1
(i5 2400@3.7GHz - 16GB DDR3 - HD6770 w/radeon driver - SSD+RAID1)
True private storage on SpiderOak
User avatar
eanfrid
Level 7
Level 7
 
Posts: 1784
Joined: Mon Apr 30, 2012 2:49 am

Re: Command on Start up

Postby Holland1994 on Fri Feb 22, 2013 2:06 pm

Hi thanks for your reply.

I added the code modprobe p54pci, but nothing happens when I reboot the computer; I still have to manually load the wifi modules in the terminal.
Here is my code:


Code: Select all
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

lp
modprobe 8139too
modprobe 8139too
modprobe 8139too
modprobe p54pci
Holland1994
Level 1
Level 1
 
Posts: 8
Joined: Thu Jan 31, 2013 6:56 am

Re: Command on Start up

Postby eanfrid on Fri Feb 22, 2013 2:10 pm

:D
This should then read:
Code: Select all
    # /etc/modules: kernel modules to load at boot time.
    #
    # This file contains the names of kernel modules that should be loaded
    # at boot time, one per line. Lines beginning with "#" are ignored.

   lp
   8139too
   p54pci
No command line there, these are parameters.
Main desktop: Debian GNU/Linux Wheezy 64bit w/custom 3.14 longterm kernel - MATE 1.8.1
(i5 2400@3.7GHz - 16GB DDR3 - HD6770 w/radeon driver - SSD+RAID1)
True private storage on SpiderOak
User avatar
eanfrid
Level 7
Level 7
 
Posts: 1784
Joined: Mon Apr 30, 2012 2:49 am

Re: Command on Start up

Postby Holland1994 on Sat Feb 23, 2013 4:58 am

Thanks, that worked :D
Holland1994
Level 1
Level 1
 
Posts: 8
Joined: Thu Jan 31, 2013 6:56 am


Return to Newbie Questions

Who is online

Users browsing this forum: Hecubus, jimallyn, Pierre and 25 guests