diff options
author | Simon Rettberg | 2021-07-27 14:35:05 +0200 |
---|---|---|
committer | root | 2021-07-27 14:35:05 +0200 |
commit | 001ec398728afacd1e639c83fa7eea9dba091fc1 (patch) | |
tree | 444d51f15e5744baad0d3b9a5533fd7bfb23a549 /core/modules/libvirt | |
parent | [dhcpc-busybox] Fix paths, extglob (diff) | |
download | mltk-001ec398728afacd1e639c83fa7eea9dba091fc1.tar.gz mltk-001ec398728afacd1e639c83fa7eea9dba091fc1.tar.xz mltk-001ec398728afacd1e639c83fa7eea9dba091fc1.zip |
useradd.inc: Rewrite helper once again
Diffstat (limited to 'core/modules/libvirt')
-rw-r--r-- | core/modules/libvirt/module.build | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/core/modules/libvirt/module.build b/core/modules/libvirt/module.build index 3672b4c2..efd4b07d 100644 --- a/core/modules/libvirt/module.build +++ b/core/modules/libvirt/module.build @@ -1,14 +1,10 @@ #!/bin/bash module_init() { - local uid gid - # TODO theye functions suck, make thin wrappers around useradd et al. - gid="$( add_system_group "kvm" )" - uid="$( USER="libvirt-qemu" \ - GROUPID="$gid" \ - add_system_user )" - [ -z "$uid" ] && perror "Could not create libvirt-qemu user" - (( uid >= 1000 )) && perror "libvirt-qemu user has uid >= 1000" + groupadd --system "kvm" + groupadd --system "libvirt-qemu" + useradd --gid "kvm" --groups "libvirt-qemu" --system \ + --no-create-home --inactive --home-dir "/var/lib/libvirt" "libvirt-qemu" } fetch_source() { |