From: "paul kölle" <paul@subsignal.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] writing net.xx style init script
Date: Sun, 20 Aug 2006 17:22:41 +0200 [thread overview]
Message-ID: <44E87E41.7080700@subsignal.org> (raw)
In-Reply-To: <200608200811.22948.vapier@gentoo.org>
Mike Frysinger wrote:
> On Sunday 20 August 2006 08:01, paul kölle wrote:
>> How do I get the name of the called script in /etc/init.d? Better ideas?
>
> use $SVCNAME
>
> see the sshd init.d script for some examples
thanks mike, you got me started ;)
actually there is plenty of choice here:
gentoo ~ # cat /etc/init.d/dummy
#!/sbin/runscript
start() {
einfo "$(set)"
}
leads to:
gentoo ~ # ls -l /etc/init.d/
.
-rwxr-x--- 1 root root 267 Aug 20 17:10 dummy2
lrwxrwxrwx 1 root root 18 Aug 20 17:12 dummy2.v1 -> /etc/init.d/dummy2
.
gentoo ~ # /etc/init.d/dummy2.v1 start
* rc_name is: dummy2.v1
* myservice is: dummy2.v1
* myscript is: /etc/init.d/dummy2.v1
* SVCNAME is: dummy2.v1
* BASH_ARGV[1]: /etc/init.d/dummy2.v1
* BASH_SOURCE[0]: /etc/init.d/dummy2.v1
I'll stick with SVCNAME for now ;)
thanks again,
Paul
--
gentoo-dev@gentoo.org mailing list
next prev parent reply other threads:[~2006-08-20 15:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-20 12:01 [gentoo-dev] writing net.xx style init script paul kölle
2006-08-20 11:19 ` Marius Mauch
2006-08-20 12:11 ` Mike Frysinger
2006-08-20 15:22 ` paul kölle [this message]
2006-08-20 21:00 ` Mike Frysinger
2006-08-20 12:39 ` Roy Marples
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44E87E41.7080700@subsignal.org \
--to=paul@subsignal.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox