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=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, 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 74ECA2EDF5 for ; Sun, 8 Dec 2024 00:46:22 +0100 (CET) Received: (qmail 49674 invoked by uid 89); 7 Dec 2024 23:46:47 -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 49664 invoked from network); 7 Dec 2024 23:46:46 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1733615174; x=1734219974; i=janbraun@gmx.de; bh=VJzMhIu+YvKECKoc7mHJLXeYBka1aUccnIQR025E4zY=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:Message-ID:References: MIME-Version:Content-Type:In-Reply-To:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=ekiZXTiOSUcTQ88lKpgeifGVjxYTL524ije2h5x2erqpwKNUuu6tumEn1+7Iehyf 1N8rzqet9wpxLfkeGStgu6LzMFBP513G5DcKP7pq7lPzy00eu//Q7mAS38VVHNBl+ XlnhChGevettPrnieHGCFqAjvSpqB1uysvJZfHj6f3y1whCskQXgFVKH6jPdL2vTm Q96kZYzpSxi6oPXX2KVy2L+Rjpg5OpsgwIc9mqieC71Gwm6vWKXkRlwtME7vn8J3J 6uNIIsjpFgTfXTvjMxhgOe7iuLY8rQ6TN9fgcdBqK4gW61Rjd1iBX//3onEyIHhhv V3dLiuzE/QpBHvOuxw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Date: Sun, 8 Dec 2024 00:46:12 +0100 From: Jan Braun To: Laurent Bercot Cc: supervision@list.skarnet.org Subject: Re: Have an external script wait for a oneshot service Message-ID: Mail-Followup-To: Laurent Bercot , supervision@list.skarnet.org References: <4faed412-6fc0-4833-8f76-b6a74667c869@sopka.ch> <3d1391e4-b240-4675-a839-a34c39d474b3@sopka.ch> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="CLXS/Y8gB8RnpxQM" Content-Disposition: inline In-Reply-To: X-GPG-Fingerprint: 1736 D50F 170B 70A6 9223 BC15 295E 703E 6D1D 2FCF X-GPG-Encryption-Welcome: always X-Provags-ID: V03:K1:fueSt8kD7cuDMr/CN27CsktI2YpYpAVHN4wFCoNdD4EtZaH6maB Oj4iewSc5xwJhYDGBQxIAY6aJh5CQLr6ZWaOKBGAubQV8cD8qd61P4UVpWzjOKGwZTS/mor zuTfQmnyRHO62t7LKqlTZY2dHboPEowpGmF7Ow8jKRxKtSt8YjYsQspN/1+Z9ny3cn5BY5y +5OjvvNwzjqqFYOeiw6IQ== UI-OutboundReport: notjunk:1;M01:P0:9P+x3oeq+oA=;7xEh/XzFiM73GTB6olT9VQ+vWfi Ls+8EViKQvJANUd/Xfl2SAtrd1irQMnJYawGyLVzib4Nf5ygtW4dbWTitPj768gGaVnnBW7R/ t1sh4XVVgeSUDHqegQa2T5CYoxNwJnoeUAN1eSCK32M/xu9XRF6IHm5c2rR9atE5rt8Y+dyul y+6G+pA1wNohxBuslu2HZZ9SLTnYHtUZ+kE5JrLwuj78h7MoMpFfv+oFBSEH/Y6X1JGZUI6LR g3kcx33aoOt99/GydKWIYjjNgzdwgk/E8TXr/G0fNjEST2g58xEq8upPkjYYPW8Y6F726vnJc xz/mpOYgcTByeUndxV2Qm9stLGIxRuIm6hSI7+DRKtplfJfF0UIApg17vSkRAUYw1SEIeCP1N Tuovbr1pvGxuEgQceBD4J0QNVq5gl4rlrKO+xxXTiuGWNfJ+1ZZC71nw+NWdWueqpWjg8AGda +3R1GLR9imX2N9UBR+90dt9xoj3oStsHhN6hYj4uzsfGLXlyJtlc1eCn/CNWPifgq6VmHmzPI L8m07hBB41mBmIY9r3nXC/JR3kMjoLzB5A3T5EVV9tx8Hz2Izp51gG1q+JwMYx2jZGyNS3Rpu PtN11x7tM4y1m1vMm707NIafk4OlfgP7YYeH5Jn3C0T3h5NybTK9bGnJrQHBTsdHCdGRPmMui 8V8wujp0+PhrLfjB9352+ebESXpIhHy/4hkQj3TS4/fD1oq2NjozrJ7IkfVS4cFF9e/z7PFO8 B9ymq8M2sFQLIcObDHiQxh7SC6DdeALaBxmH5iFt2V9EJlYV35MmYKBMcylt7msrY8fW+dovk rLEGdNtDKrOH8Fc+ZWxO95rW7+IsrOejkZtxQxlPncZ3FSa35m5uKnGvJgkIx2E0Af5ESx4Dj LJZ6g1e6p5jB/bIHRmZPS4NI/6ULwMYq9SLWasmTAacNtHtNUTQ25tI8BTfKYu3zg85ZGMPZy n7W4Vvm2qYYRcCjQwHkb773vqRo8vhyQfBTnIfmuWOXEfKZSMXf/qTLIvoKYSF4Vq363nYhVO HmnkhKHs7J+HIhc6YmrmhhOP50qYSLo83y/rd05usA2yz0sAkE0Sm+ms9tj2c0gZm1VxxcS8r C2q3ksEvs= --CLXS/Y8gB8RnpxQM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Laurent Bercot schrob: [restored quote for context] > > > You want to run s6-rc at login time, sure, I can totally see where i > > > can be beneficial there. But earlier? Even systemd doesn't run user > > > stuff before a user logs in. And if *they* don't do it, it means that > > > there are ZERO use cases. > > > > This is an argumentum ad verecundiam. > > Not at all. I never refer to systemd as an authority (lol). > It's just that systemd is maximalist: every use case they can think of, > they include. (Since the unit file format is extensive, they have to.) > They include way, way more than they should; they are by no means an > example to follow. My point is that if a use case isn't planned for in > systemd, there's a pretty good chance it's not a real one. Users have been able to run oneshots at boot since before systemd existed: @reboot in a user crontab. That alone should prove the use case is real. And systemd apparently *does* have the ability to run user stuff without the user logging in: https://wiki.archlinux.org/title/Systemd/User#Automatic_start-up_of_systemd_user_instances I didn't find an @reboot equivalent for systemd timers in a quick search, but since oneshots are used for managing state, my guess is their answer would be "there should be a special systemd functionality for managing that particular state, use that" and/or "fix the state in the ExecStartPre for the service relying on the state". The latter would even be reasonable: as a runit user, I've always been ensuring necessary state in the ./run file, and never found the lack of explicit support for oneshots limiting. That is also why I can't form an opinion on the merits of Paul Sopka's proposal. But effectively saying "(user)oneshots/s6-rc are useful while the user is logged in, but not while the user is not logged in" seems wrong. That's machinery that might be useful, or might not be, but it shouldn't depend on or care about the user's login state. cheers, Jan --CLXS/Y8gB8RnpxQM Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEFzbVDxcLcKaSI7wVKV5wPm0dL88FAmdU3j8ACgkQKV5wPm0d L8/Jbw/+KBnwBt9a/ORmfXHB2IShRaHt00pxBR0YMi0bWERPxGnWxVkg2k58hqov 7l3weqXUzdwo4AvPZS8DJxjdnjDHvYOevrjoR8TVRYZxUMjVzJOFAhjePRqfq3EU eAjiVJRpQfVoaaVjIPx3IAjfEksv3lSevM2bGwTlAPjYAyYSui/gtHwSGnHFx5V6 gWoHwpSmvYJzjrgLqG8dh5ePuH7fklESI/6ZW67tw/UugeuGqOiRwNzA/cA+oRTA j52/dZJrwoWVbFsw07arvma44pxhgkP6gKxMG2laj9tZSX/3mKemp8A/vpzBFT60 UADsiLuYF3Io8Ov6cVxiFFbnYEUlPEqNuNBwgVLRa30PCIWrP8hnK0irHEZvFky6 8PBLISQBBeT3gd0os0l/6/v3g3NkhBI7TuUTDrx9cD+kmRpQVxHPs3wSXfHxNgwB UDG0oWdi6oakpw7VtEUX5QDLmTtfktmq3xPV2Eqe0SCmFA0a9T/y4tT06+u70K7g IIv2lP+uAEUhk8FzhdUu3vWJeT8yISvJJPTw7mXFtgiTSlcZhGbZWl9MvX9nnJ7w rqnLMVLCaouayRi5+Ss6j9CDA/gNBUr3K4c4j74aQExJI5COPSnh3I8TwAFURSqp f15APREH984VNMbIkswKxiz1YI18kfDHUsFRys3KbsE+sP8/+6s= =VDj5 -----END PGP SIGNATURE----- --CLXS/Y8gB8RnpxQM--