I have some commands to in my rc.local. I know that they are failing. How can I get log file with messages produced by executing rc.local? Where is it located?
I have checked the /var/log/boot.log. I know my messages are not there because I know already what is the reason of failure. But I still want to make sure from log file.
Note, I don't want to run script again, I could but I don't want. I would rather analyse wht happened during startup.
Thanks for any help.
Ubuntu 12.04 Desktop (if it matters)
exec &> /tmp/rc.local.logis enough instead of the two exec calls :-) – TWL Jul 03 '18 at 13:25&>redirection is a Bash-ism and fails silently in Dash and other “plain” implementations of/bin/shinterpreters like the one used forrc.local. – David Foerster Sep 07 '18 at 07:48!/bin/sh -e? – bomben Sep 03 '19 at 19:33rc.localseems to be configured to log in/var/log/syslog. For that OS, see other answers for less intrusive ways to accessrc.localoutput. – akaihola Dec 09 '20 at 07:17