• 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?

  • 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.

  • 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]

  • 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?

  • 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.

  • Moderator

    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… ?!?