Skip to content

Commit

Permalink
init script bug fix: don't allow configuring networks until group mem…
Browse files Browse the repository at this point in the history
…bership is active
  • Loading branch information
mpontillo committed May 26, 2016
1 parent 93875c3 commit 30e6577
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions init
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,18 @@ sudo apt-get install -yu \
sudo usermod -a -G libvirtd,kvm $USER
sudo aa-complain /usr/lib/libvirt/virt-aa-helper


cd "$(dirname $0)"
./configure-networks

if ! id | awk '{ print $3 }' | grep '(libvirtd)' | grep -q '(kvm)'; then
echo ""
echo "Your user was just added to the 'libvirtd' and 'kvm' groups, but"
echo "membership was not yet taken effect."
echo "You need to log out, log back in, and then re-run:"
echo ""
echo " $(pwd)/$(basename $0)"
echo ""
exit 1
fi

./configure-networks
./sync

0 comments on commit 30e6577

Please sign in to comment.