Prev: FAQ 2.4 I copied the perl binary from one machine to another, but scripts don't work.
Next: FAQ 1.1 What is Perl?
From: Henry Law on 4 Apr 2010 07:57 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 |