From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: from alyss.skarnet.org (alyss.skarnet.org [95.142.172.232]) by inbox.vuxu.org (Postfix) with SMTP id 361E02380B for ; Mon, 4 Nov 2024 01:17:12 +0100 (CET) Received: (qmail 823 invoked by uid 89); 4 Nov 2024 00:17:38 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Received: (qmail 816 invoked from network); 4 Nov 2024 00:17:37 -0000 From: "Laurent Bercot" To: "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 Message-Id: In-Reply-To: References: <1d5e61fc-807f-48d8-8721-1194f3a5338a@sopka.ch> Reply-To: "Laurent Bercot" User-Agent: eM_Client/10.0.3530.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable > >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