Create qemu user:group if necessary at package installation
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=130
This commit is contained in:
parent
cda650a7d1
commit
de798baff8
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 1 10:10:23 MDT 2011 - jfehlig@suse.de
|
||||
|
||||
- Create qemu user:group if necessary at package installation.
|
||||
More fallout from bnc#694883
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 30 14:48:51 MDT 2011 - jfehlig@suse.de
|
||||
|
||||
|
@ -707,6 +707,15 @@ then
|
||||
< %{_datadir}/libvirt/networks/default.xml \
|
||||
> %{_sysconfdir}/libvirt/qemu/networks/default.xml
|
||||
fi
|
||||
# Create qemu user:group if necessary
|
||||
if test "%{qemu_user}" = "qemu"; then
|
||||
%{_bindir}/getent group qemu >/dev/null || \
|
||||
%{_sbindir}/groupadd -r qemu 2>/dev/null
|
||||
%{_bindir}/getent group kvm >/dev/null && group_opts="-G kvm"
|
||||
%{_bindir}/getent passwd qemu >/dev/null || \
|
||||
%{_sbindir}/useradd -r -g qemu $group_opts -d / -s /sbin/nologin \
|
||||
-c "qemu user" qemu
|
||||
fi
|
||||
%endif
|
||||
%if 0%{?sles_version}
|
||||
%{fillup_and_insserv -y libvirtd}
|
||||
|
Loading…
Reference in New Issue
Block a user