From: Achim Dreyer (email@example.com)
Subject: Re: [ILUG] Re: slackware (was: Esat ADSL)
Date: Tue, 17 Dec 2002 13:04:38 +0100 (MET)
On Tue, 17 Dec 2002, John P. Looney wrote:
Why don't you use the old way...
echo '#!/bin/sh' > /etc/rc.local
chmod 744 /etc/rc.local
RL=`grep ':initdefault:' /etc/inittab | cut -d: -f2`
echo "LO:$RL:once:/etc/rc.local" >> /etc/inittab
killall -HUP init
The above is a rather arch way of saying "Implement rc.local the old-fashioned way by adding a new line to /etc/inittab like
...where you should substitute for '2' whatever is your initial default runlevel. Then, create shell script /etc/rc.local, and make it executable."
This has the advantage over the "ln -s /etc/rc.local /etc/rc2.d/S99local" method usually recommended that implements genuine rc.local behaviour: It runs once the first time after boot that the system enters the specified runlevel number. The other (symlink) method runs rc.local each time the system enters that runlevel number, which is not at all the same thing.