• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Ubuntu and /etc/rc.local

    Scheduled Pinned Locked Moved
    Linux Problems
    3
    7
    3.5k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • sudburrS
      sudburr
      last edited by

      I know /etc/rc.local runs as the last thing before allowing logging onto Ubuntu server, but is there any other event that may cause this file to be run?

      [ Standing in between extinction in the cold and explosive radiating growth ]

      1 Reply Last reply Reply Quote 0
      • S
        Sebastian Roth Moderator
        last edited by

        Could you be more specific in your question. I am not sure what you are really asking. Do you want to run some commands from /etc/rc.local and they don’t work or do they run twice… ?!?

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        1 Reply Last reply Reply Quote 0
        • Wayne WorkmanW
          Wayne Workman
          last edited by

          If you give the command to “start” something in rc.local, and that thing was already enabled on boot in the system, that would cause the thing you’re trying to start to attempt to start twice…

          So, if you wanted something to start via rc.local, you’d need to also disable it on boot in the system.

          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
          Daily Clean Installation Results:
          https://fogtesting.fogproject.us/
          FOG Reporting:
          https://fog-external-reporting-results.fogproject.us/

          1 Reply Last reply Reply Quote 0
          • sudburrS
            sudburr
            last edited by

            For the sake of this thread, ignore the contents of /etc/rc.local.

            Is there anything in the OS or FOG that would cause /etc/rc.local to be run at any other time other than its expected time at the system start up?

            [ Standing in between extinction in the cold and explosive radiating growth ]

            1 Reply Last reply Reply Quote 0
            • Wayne WorkmanW
              Wayne Workman
              last edited by

              This might help you with figuring out if it gets called twice:

              [QUOTE][SIZE=15px][FONT=Helvetica Neue][COLOR=#222222]To log what happens to a file in the future, use [/COLOR][/FONT][/SIZE][URL=‘http://inotify-tools.sourceforge.net/’][FONT=Helvetica Neue][COLOR=#1078a5][SIZE=15px]inotifywait[/SIZE][/COLOR][/FONT][/URL][SIZE=15px][FONT=Helvetica Neue][COLOR=#222222]. [/COLOR][/FONT][/SIZE][COLOR=#222222][FONT=Consolas][SIZE=13px]inotifywait -e /path/to[/SIZE][/FONT][/COLOR][SIZE=15px][FONT=Helvetica Neue][COLOR=#222222] will print a line [/COLOR][/FONT][/SIZE][COLOR=#222222][FONT=Consolas][SIZE=13px]/path/to/ ACCESS file[/SIZE][/FONT][/COLOR][SIZE=15px][FONT=Helvetica Neue][COLOR=#222222] when someone reads [/COLOR][/FONT][/SIZE][COLOR=#222222][FONT=Consolas][SIZE=13px]file[/SIZE][/FONT][/COLOR][SIZE=15px][FONT=Helvetica Neue][COLOR=#222222]. This interface won’t tell you who accessed the file; you can call [/COLOR][/FONT][/SIZE][COLOR=#222222][FONT=Consolas][SIZE=13px]lsof /path/to/file[/SIZE][/FONT][/COLOR][SIZE=15px][FONT=Helvetica Neue][COLOR=#222222] as soon as this line appears, but there’s a race condition (the access may be over by the time lsof gets going).[/COLOR][/FONT][/SIZE][/QUOTE]

              Resource: [url]http://unix.stackexchange.com/questions/12247/linux-file-access-monitoring[/url]

              Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
              Daily Clean Installation Results:
              https://fogtesting.fogproject.us/
              FOG Reporting:
              https://fog-external-reporting-results.fogproject.us/

              1 Reply Last reply Reply Quote 0
              • Wayne WorkmanW
                Wayne Workman
                last edited by

                also, maybe take a look at this:

                [url]http://www.cyberciti.biz/tips/linux-audit-files-to-see-who-made-changes-to-a-file.html[/url]

                Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                Daily Clean Installation Results:
                https://fogtesting.fogproject.us/
                FOG Reporting:
                https://fog-external-reporting-results.fogproject.us/

                1 Reply Last reply Reply Quote 0
                • sudburrS
                  sudburr
                  last edited by

                  This will help. Thank you. I was just hoping someone knew definitively. This is a closed development system I’m experimenting with and I’m considering different ways of doing differing things. This is one of them.

                  [ Standing in between extinction in the cold and explosive radiating growth ]

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  • First post
                    Last post

                  186

                  Online

                  12.0k

                  Users

                  17.3k

                  Topics

                  155.2k

                  Posts
                  Copyright © 2012-2024 FOG Project