• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • 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.
  • S
    sudburr
    last edited by Apr 24, 2015, 3:48 PM

    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 Apr 29, 2015, 9:19 AM

      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
      • W
        Wayne Workman
        last edited by Apr 29, 2015, 1:54 PM

        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
        • S
          sudburr
          last edited by Apr 29, 2015, 5:48 PM

          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
          • W
            Wayne Workman
            last edited by Apr 29, 2015, 6:13 PM

            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
            • W
              Wayne Workman
              last edited by Apr 29, 2015, 6:14 PM

              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
              • S
                sudburr
                last edited by Apr 29, 2015, 7:51 PM

                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
                1 / 1
                • First post
                  2/7
                  Last post

                193

                Online

                12.0k

                Users

                17.3k

                Topics

                155.2k

                Posts
                Copyright © 2012-2024 FOG Project