Friday, October 21, 2005

debugging RC scripts. solaris9

debugging RC scripts. solaris9

I can remember how to debug the startup scripts. Can someone help me
out here. I just want Solaris to report what startup script it is
currently executing. I thought it was as simple as adding a "+" to the
/etc/rc* script but that didnt work.

There's no really simple way to do this. You may be thinking of adding
set -x to /etc/rc?, but that gets overly verbose for me.

Often I've made a small edit to /etc/rc?. There's a startup loop in
there where it runs /bin/sh $f start or so for each of the scripts.
Just add a "echo starting $f" and a "echo done starting $" inside the
"if" and outside the "case" statements. (and make a backup!). Then you
can tell what it's trying to do and where it hangs.

Once there, you can make that one script more verbose.

If you were running Solaris 10, you could use 'boot -m verbose'.



Post a Comment

<< Home