Runlevel testing in init scripts

Björn Lindberg d95-bli at
Tue Sep 10 02:03:14 PDT 2002

DJ Lucas wrote:
> Hello,
> While I'm not sure anyone beyond myself is actually interested in this
> working, as most people can live with the yellow [ATTN]s, it's kinda struck
> me as unclean since I started with LFS and I wanted to do some checking in
> the init scripts.  I've finally managed to make what I have thus far,

I still haven't been able to figure out what you're actually trying to
do here. :-) What kind of checking?

> scripts, and may or may not omit this line.  So, is there anyway to get the
> name of the currently running script?  Even the symlink name would work, as
> I could butcher it and get the name with ls -l, sed, and basename if needs

The name of the script is available in the variable $0, eg:

d95-bli at monty:~/tmp> cat

echo $0
d95-bli at monty:~/tmp> ./
d95-bli at monty:~/tmp>

Unsubscribe: send email to listar at
and put 'unsubscribe lfs-chat' in the subject header of the message

More information about the lfs-chat mailing list