Command on Start up

Quick to answer questions about finding your way around Linux Mint as a new user.
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. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Holland1994

Command on Start up

Post by Holland1994 »

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?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
eanfrid

Re: Command on Start up

Post by eanfrid »

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
Holland1994

Re: Command on Start up

Post by Holland1994 »

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
eanfrid

Re: Command on Start up

Post by eanfrid »

: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.
Holland1994

Re: Command on Start up

Post by Holland1994 »

Thanks, that worked :D
Locked

Return to “Beginner Questions”