rc.local is called from
rc.M using the "dot" command:
Code:
# Start the local setup procedure.
if [ -x /etc/rc.d/rc.local ]; then
. /etc/rc.d/rc.local
fi
This causes
rc.local to be executed inside the current shell; basically, the contents of
rc.local are imported into
rc.M. An "exit" command at the end of
rc.local would therefore have caused the calling script (
rc.M) to terminate.