Saturday, November 28, 2015

Debian 8 does not execute /etc/rc.local

I have just installed a fresh Debian 8 Jessie and then I put something in /etc/rc.local.
To my suprise, after the reboot, the command did not execute.
Log investigation showed:
Failed to start /etc/rc.local Compatibility.
Failed at step EXEC spawning /etc/rc.local: Exec format error
So I simply added "#!/bin/sh -e" in the first line of rc.local and then it worked well.

No comments: