1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-26 20:55:19 +03:00
aports/community/qemu/qemu.pre-install
Rasmus Thomsen e100ed3cd3 community/qemu: run pre-install as pre-upgrade hook so users are created during upgrade
We introduced a new user in qemu previously with 2f32bfc751,
but that user is only ever created when qemu is installed from scratch
and not when upgrading an exisiting qemu installation. This broke
upgrading from 3.11 -> 3.12 where we expect the qemu user to be available
in 3.12 but it wasn't unless you removed and installed qemu again.
Also redirect the stderr of adduser to /dev/null so users don't see
"adduser: user 'qemu' in use" during upgrades.

fixes #11618
2020-06-07 14:11:31 +02:00

7 lines
146 B
Bash

#!/bin/sh
addgroup -S -g 34 kvm 2>/dev/null
addgroup -S -g 36 qemu 2>/dev/null
adduser -S -u 36 -G kvm -s /sbin/nologin qemu 2>/dev/null
exit 0