commit f3bb332309c205ac8b1dfd954ec7f2ccb4033f0a Author: Mike Perry mikeperry-git@torproject.org Date: Tue Jul 22 12:43:20 2014 -0700
Check kvm group membership prerequisite.
If the user is not at the X11 console, then they must be in the kvm group to access /dev/kvm. --- gitian/check-prerequisites.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/gitian/check-prerequisites.sh b/gitian/check-prerequisites.sh index e470b84..62167e9 100755 --- a/gitian/check-prerequisites.sh +++ b/gitian/check-prerequisites.sh @@ -49,7 +49,7 @@ then fi
if [ "z$USE_LXC" != "z1" ]; -then +then groups | grep libvirtd > /dev/null if [ $? -ne 0 ]; then @@ -60,6 +60,19 @@ then echo " newgrp libvirtd" exit 1 fi + if [ -z "$DISPLAY" ]; + then + groups | grep kvm > /dev/null + if [ $? -ne 0 ]; + then + echo "You need to be in the kvm group to run Gitian on a headless server." + echo + echo "Please run:" + echo " sudo adduser $USER kvm" + echo " newgrp kvm" + exit 1 + fi + fi fi
tbb-commits@lists.torproject.org