Re: s6/s6-rc policy for Gentoo
Hoël Bézier <[email protected]> Sun, 7 Jul 2024 17:18:51 +0200
| Newsgroups | gmane.comp.sysutils.supervision.general |
|---|---|
| Message-ID | <Zoqx4vsAiElcJvHh@sparta> |
Hi, Am Sa, Jul 06, 2024 am 03:09:26 +0200 schrieb Paul Sopka: >This brings me to the final problem which the alternative mentioned >above solves already: The user services manage a couple of things, >namely the XDG_RUNTIME_DIR and DBUS_SESSION_BUS_ADDRESS that need to be >propagated to the users login shell. Is there a more elegant way to do >this other then having the user source an env directory in his >.bash_profile? What I do is little different: my login shell is /etc/execline-startup, which after setting up a few things, execs into ~/.execline-loginshell, which among other things execs into s6-envdir reading the same env dir as my supervision tree, and finally executes into my actual shell. I’ll attach the files to this email so you can take a look at them. Don’t credit me on this, I actually took it all from the lh-bootstrap stuff written by Laurent. :D BISOUS Hoël
execline-startup
(text/plain, 279 B)
#!/bin/execlineb -s0
/bin/multisubstitute
{
importas -i HOME HOME
importas -i LOGNAME LOGNAME
}
/bin/export USER ${LOGNAME}
/bin/s6-envdir /etc/env-startup
/bin/fdblock 0
/bin/fdblock 1
/bin/fdblock 2
/bin/tryexec { ${HOME}/.execline-loginshell $@ }
/etc/execline-shell $@
.execline-loginshell
(text/plain, 161 B)
#!/bin/execlineb -s0
importas -i PATH PATH
importas -i HOME HOME
export PATH ${HOME}/.local/bin:${PATH}
s6-envdir ${HOME}/.config/env
${HOME}/.execline-shell $@
.execline-shell
(text/plain, 58 B)
#!/bin/execlineb -s0
backtick -nx GPG_TTY { tty }
fish $@
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEElZjiR4iQkYjVEGdt6jPCPrF3Nk0FAmaKsdwACgkQ6jPCPrF3 Nk0+Ow//a/aagHrbricCuG1zbQQ5rBUG7ItQ8n/vAvmB2iwMz1FP1fiHBC3b/Ywy 8a/Iizjvr+IuBlTWmMwdab489GdbhHVitXzDSroWj1oA0R5KRBx+0GtZsZCf+VBo vbgPQEiBkfhXvFGeVLNOFzS8ADfLMsBFgDTT5JyAJ3r93qPXnCCTpqDyzt2Y2yje zxetD9SF5vc+0xQgeQ/eQE1kS/ugP4z7RLdmLo1mlXy0js8JkebqmT5G7rQqZxzn Ml7mcCsZrvT4jsxmloKGsN5hVprA4cLIsX1BvkFCGvt0U3e/G65TIjohmu6C9wAi j+Q7LwgIDVfxOF5s5qZD/R0PiAmF30URfl6dZISGE8zP0ZXe+E46a3A1xXSIZU6f zXKFIatPMBtL8jLImnNbXWHbeFocQoNlm4ewOjGfs7yoS1xWl6dZ5ylw864MSQOO V/bOErz/tUYKgN3hIL1uXWu6lJgvC1yQyaIYboapkVzt7r7LItvJXtkiaDQUK8XX YLXkLMOEKCBxYyRVnP6g0cmonHH9dyb2q+O2xROrB1nplacKtAAmIFHYar8+bH1N BZRuMVQ6DxylpbpboQr6gNyC9xvYkJ6yKAXjf4RxioeSJ3DIvPjltzbZ6RERRX3h Q7yXYZiF+kt5QcZma93HK4rzif8xCO5E7gpPbgI08eEs5smInxw= =gC77 -----END PGP SIGNATURE-----