Find the answer to your Linux question:
Results 1 to 10 of 10
Hi all, Fedora 18 desktop 64bit I couldn't find /etc/rc.local Which file will be last called at boot? I need to put some commands there. TIA B.R. satimis...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,763

    Which file to be finally evoked at boot?


    Hi all,

    Fedora 18 desktop 64bit

    I couldn't find /etc/rc.local

    Which file will be last called at boot? I need to put some commands there. TIA

    B.R.
    satimis

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    11,173
    /etc/rc.local is usually a link to /etc/rc.d/rc.local
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,763
    Quote Originally Posted by Rubberman View Post
    /etc/rc.local is usually a link to /etc/rc.d/rc.local
    Hi,

    I suppose I have to create it?

    $ ls /etc/rc.d/
    Code:
    init.d/ rc0.d/  rc1.d/  rc2.d/  rc3.d/  rc4.d/  rc5.d/  rc6.d/
    On which folder shall I create rc.local? rc0.d?

    $ ls /etc/rc0.d/
    Code:
    K01livesys-late  K65vboxadd-service  K70vboxadd-x11  K88iscsi   K90network
    K50netconsole    K70vboxadd          K85ebtables     K89iscsid  K99livesys
    Thanks

    Rgds
    satimis

  4. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    11,173
    It's possible that more recent versions of Fedora are using a different file for this. There should be an rc.local in /etc/rc.d. Since I don't see one (I am using RHEL/ScientificLinux 6) it may be something else entirely, or you may be correct in that you need to create such a file. In any case, the default contents of /etc/rc.d/rc.local is this:
    Code:
    #!/bin/sh
    #
    # This script will be executed *after* all the other init scripts.
    # You can put your own initialization stuff in here if you don't
    # want to do the full Sys V style init stuff.
    
    touch /var/lock/subsys/local
    IE, it doesn't really do anything...
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  5. #5
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,763
    Quote Originally Posted by Rubberman View Post
    It's possible that more recent versions of Fedora are using a different file for this. There should be an rc.local in /etc/rc.d. Since I don't see one (I am using RHEL/ScientificLinux 6) it may be something else entirely, or you may be correct in that you need to create such a file. In any case, the default contents of /etc/rc.d/rc.local is this:
    Code:
    #!/bin/sh
    #
    # This script will be executed *after* all the other init scripts.
    # You can put your own initialization stuff in here if you don't
    # want to do the full Sys V style init stuff.
    
    touch /var/lock/subsys/local
    IE, it doesn't really do anything...

    Thanks

    satimis

  6. #6
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,307
    Note that you may have to enable the service that executes that file nowadays:

    Code:
    systemctl enable rc-local.service
    seems ridiculous, but there it is.

  7. #7
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,763
    Quote Originally Posted by atreyu View Post
    Note that you may have to enable the service that executes that file nowadays:

    Code:
    systemctl enable rc-local.service
    seems ridiculous, but there it is.
    Do I need create /etc/rc.d/rc.local
    ?

    Thanks

    satimis

  8. #8
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,307
    Quote Originally Posted by satimis View Post
    Do I need create /etc/rc.d/rc.local?
    Yes. According to the Fedora 16 Release Notes:

    3.2.4. rc.local no longer packaged
    The /etc/rc.d/rc.local local customization script is no longer included by default. Administrators who need this functionality merely have to create this file, make it executable, and it will run on boot.

    Upgrades are not affected by this change.

    It has to do with the migration from SysV to systemd.

  9. #9
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,763
    Quote Originally Posted by atreyu View Post
    Yes. According to the Fedora 16 Release Notes:

    3.2.4. rc.local no longer packaged
    The /etc/rc.d/rc.local local customization script is no longer included by default. Administrators who need this functionality merely have to create this file, make it executable, and it will run on boot.

    Upgrades are not affected by this change.

    It has to do with the migration from SysV to systemd.
    Thanks

    satimis

  10. #10
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,307
    I assume your issue has been resolved, closing thread.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •