From: "Laurent Bercot" <ska-supervision@skarnet.org>
To: "supervision@list.skarnet.org" <supervision@list.skarnet.org>
Subject: Re[2]: s6-rc: oneshot services do not get their name as arg 1
Date: Mon, 04 Nov 2024 00:17:10 +0000 [thread overview]
Message-ID: <emf18dd7d4-d55f-4c2b-b973-d052df6a9ae3@8d4c8b0d.com> (raw)
In-Reply-To: <ee137166-cc5f-4d3c-87ea-fb32ac5d8fd1@sopka.ch>
>
>Symlinking the oneshot service directory with other names,
>e.g. having a oneshot script for setting up the network
>and symlinking it for different interfaces, so that a change
>does not have to be made in all the copied scripts
>(of course its unlikely to have enough interfaces
>to justify this, but it conveys the idea).
Yeah, I thought about this too, but given the structure of up/down
scripts, it's just not worth it. If your up/down script is bigger
than a one-liner, then unless you're super proficient in execline,
you'll probably want to write your real service script somewhere
and invoke it in up. That's the recommended usage. And as soon as
you're doing that, everything that you want to factorize, you
factorize in your real service script.
For instance, your "eth0" up script could be:
/etc/networking/start-interface eth0
and your "eth1" up script would be:
/etc/networking/start-interface eth1
and all the real work is done in the start-interface script. That way,
you don't have to mess with symlinks in the up scripts, etc.
--
Laurent
next prev parent reply other threads:[~2024-11-04 0:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-03 21:46 Paul Sopka
2024-11-03 21:57 ` Laurent Bercot
2024-11-03 22:16 ` Paul Sopka
2024-11-04 0:17 ` Laurent Bercot [this message]
2024-11-04 7:18 ` Paul Sopka
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=emf18dd7d4-d55f-4c2b-b973-d052df6a9ae3@8d4c8b0d.com \
--to=ska-supervision@skarnet.org \
--cc=supervision@list.skarnet.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;
as well as URLs for NNTP newsgroup(s).