Re: debug boot script
On Wed, Jul 2, 2008 at 7:39 PM, Gabriel Parrondo <email@example.com
El mié, 02-07-2008 a las 16:43 +0800, ray escribió:
At what point in the bootup process was the script set to run? If it's
> I want to debug an init cript in /etc/rcS.d That script outputs some
> messages using echo, so the messages should be printed to the stdout.
> I guess the redirect mechanism provided by shell is supposed to work
> in order to grab these messages into a file. To verify it, I created a
> test script in /etc/rcS.d, writing the content as below:
> echo "hello" > /tmp/message
> But when I boot up the system, nothing happened. Can somebody give me
> any hint?
run before the mountall script, /tmp was probably not mounted yet
(assuming it's in a separate partition).
I didn't modify the script I'm interested, I just created a test script in /etc/rcS.d and named it S01atest.sh, so this script will the first script to be run on boot. /tmp is not in a separate partition in my case.
Also, there's a script that cleans up /tmp and /var/tmp; make sure
you're not running before that one either.
You could try sending the output somewhere else as well. /var/log comes
In my case /var is in a separate partition, so /var/log is available? I found the very preceding scripts in /etc/rcS.d such as S02mountkernfs.sh already use the /var directory.
GNU/Linux User #404138
GnuPG Public Key ID: BED7BF43
"The only difference between theory and practice is that, in theory,
there's no difference between theory and practice."