Discussion:
Global nspawn container settings
(too old to reply)
Gervais, Francois
2018-10-16 14:15:59 UTC
Permalink
Hi,

I saw the .nspawn files which can be used to add settings to a specific machine.

I'd like to know if there is a way to add settings to all machines at once.

For example, I'd like all machines to bind-ro my .bashrc so I feel more at home :)
Lennart Poettering
2018-10-16 14:23:34 UTC
Permalink
Post by Gervais, Francois
Hi,
I saw the .nspawn files which can be used to add settings to a specific machine.
I'd like to know if there is a way to add settings to all machines at once.
For example, I'd like all machines to bind-ro my .bashrc so I feel more at home :)
No, this is not available currently. Sorry!

Lennart
--
Lennart Poettering, Red Hat
Colin Guthrie
2018-10-16 15:03:22 UTC
Permalink
Post by Lennart Poettering
Post by Gervais, Francois
Hi,
I saw the .nspawn files which can be used to add settings to a specific machine.
I'd like to know if there is a way to add settings to all machines at once.
For example, I'd like all machines to bind-ro my .bashrc so I feel more at home :)
No, this is not available currently. Sorry!
You could presumable add a drop in in
/etc/systemd/system/systemd-***@.service.d/bashrc.conf

which has
ExecStart=
ExecStart=/usr/bin/systemd-nspawn ... --bind-ro=/home/francios/.bashrc

Or something similar?

Sure you'd have to ensure you stay up-to-date with any ExecStart changes
from upstream and it wouldn't apply to any manual call of systemd-nspawn
on the command line, but it would get it for machines started from
template units or via machinectl so may get you most of the way there.

Col
--
Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
Tribalogic Limited http://www.tribalogic.net/
Open Source:
Mageia Contributor http://www.mageia.org/
PulseAudio Hacker http://www.pulseaudio.org/
Trac Hacker http://trac.edgewall.org/
Continue reading on narkive:
Loading...