Add user to kvm group only at stage end
authorHugo Villeneuve <hugo@hugovil.com>
Sat, 16 Aug 2014 00:35:51 +0000 (20:35 -0400)
committerHugo Villeneuve <hugo@hugovil.com>
Mon, 24 Nov 2014 13:41:43 +0000 (08:41 -0500)
stage5/pkg/qemu
stage5/post-install

index 1c8cd52..296e35b 100644 (file)
@@ -6,8 +6,6 @@ hvbuild_post()
 
     hv_groupadd kvm
 
-    usermod -a -G kvm ${REGUSER}
-
     # Add a Udev rule so that the KVM device gets correct permissions:
     install -v -m644 ${SCRDIR}/misc/kvm-udev.rules  \
         /lib/udev/rules.d/65-kvm.rules
index e3f50c8..6437adb 100755 (executable)
@@ -8,7 +8,7 @@ if [ -n "${REGUSER}" ]; then
     hv_useradd -g users -s /bin/bash -m ${REGUSER}
 
     # Add user to these supplementary groups:
-    usermod -a -G audio,video,cdrom,usb,shutdown ${REGUSER}
+    usermod -a -G audio,video,cdrom,usb,shutdown,kvm ${REGUSER}
 fi
 
 if [ "x${INST_TYPE}" = "xserver" -o "x${INST_TYPE}" = "xltsp-server" ]; then