mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-23 21:17:11 -05:00
guix-install.sh: Add the build users to the 'kvm' group.
Fixes <https://bugs.gnu.org/42129>. * etc/guix-install.sh (sys_create_build_user): If a 'kvm' group exists, add it to the guixbuilders' lists of supplementary groups.
This commit is contained in:
parent
dd9e77f81b
commit
8e214c53a4
1 changed files with 7 additions and 2 deletions
|
@ -330,15 +330,20 @@ sys_create_build_user()
|
|||
_msg "${PAS}group <guixbuild> created"
|
||||
fi
|
||||
|
||||
if [ $(getent group kvm) ]; then
|
||||
_msg "${INF}group kvm exists and build users will be added to it"
|
||||
local KVMGROUP=,kvm
|
||||
fi
|
||||
|
||||
for i in $(seq -w 1 10); do
|
||||
if id "guixbuilder${i}" &>/dev/null; then
|
||||
_msg "${INF}user is already in the system, reset"
|
||||
usermod -g guixbuild -G guixbuild \
|
||||
usermod -g guixbuild -G guixbuild${KVMGROUP} \
|
||||
-d /var/empty -s "$(which nologin)" \
|
||||
-c "Guix build user $i" \
|
||||
"guixbuilder${i}";
|
||||
else
|
||||
useradd -g guixbuild -G guixbuild \
|
||||
useradd -g guixbuild -G guixbuild${KVMGROUP} \
|
||||
-d /var/empty -s "$(which nologin)" \
|
||||
-c "Guix build user $i" --system \
|
||||
"guixbuilder${i}";
|
||||
|
|
Loading…
Reference in a new issue