Hi all, is there a function (or variable) I can use in a custom init script that identifies the init script name? i.e. I'm porting some init scripts from gentoo, where the $SVCNAME variable identifies the init script name within the script itself... d /* Davide Cittaro Cogentech - Consortium for Genomic Technologies via adamello, 16 20139 Milano Italy tel.: +39(02)574303007 e-mail: davide.cittaro at ifom-ieo-campus.it */ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos/attachments/20081212/3090bc5e/attachment-0003.html>
On Fri, Dec 12, 2008 at 8:37 AM, Davide Cittaro <davide.cittaro at ifom-ieo-campus.it> wrote:> Hi all, is there a function (or variable) I can use in a custom init script > that identifies the init script name? i.e. I'm porting some init scripts > from gentoo, where the $SVCNAME variable identifies the init script name > within the script itself... > d > > > /* > Davide Cittaro > Cogentech - Consortium for Genomic Technologies > via adamello, 16 > 20139 Milano > Italy > tel.: +39(02)574303007 > e-mail: davide.cittaro at ifom-ieo-campus.it > */ > > > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos > >Do you mean like $0? That gives you the current script name. Jacques B.
On Dec 12, 2008, at 2:40 PM, Jacques B. wrote:> Do you mean like $0? That gives you the current script name.:-) Fine, thanks, I thought that launching with /sbin/service somehow breaks positional variables... d /* Davide Cittaro Cogentech - Consortium for Genomic Technologies via adamello, 16 20139 Milano Italy tel.: +39(02)574303007 e-mail: davide.cittaro at ifom-ieo-campus.it */