From: Henry Law on
In a Linux system my Perl program is run on shutdown and startup
(actually on switching to runlevel 0 or 6). It's called myprog.pl but
it runs as a symbolic link from (say) /etc/rc.0/somename ->
/usr/sbin/myprog.pl

The program produces a log message and I'm keen to know which
"incarnation" of the program created it - in other words I'd like to be
able to tell which symbolic link pointed to my program when it was
executed. Any ideas? $0 simply contains /usr/sbin/myprog.pl.

After some research I fear I know the answer: the link simply points one
inode ("somename") to the inode where myprog.pl is stored, and at run
time there's no trace left of the redirection. But I'm not an expert
and I'm hoping that someone can show me how I'm wrong.

--

Henry Law Manchester, England