From 670cf5c8dc87059f4d2ef4ffcada2bd8ba33cd2e Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Sun, 14 Nov 2021 15:22:40 -0800 Subject: [PATCH] Add LIBVIRT_DEFAULT_URI to profile. --- dotfiles/profile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dotfiles/profile b/dotfiles/profile index 522556b..e13a289 100755 --- a/dotfiles/profile +++ b/dotfiles/profile @@ -26,4 +26,12 @@ if [ "$(uname)" = "Darwin" ] ; then export CLICOLOR fi +# Setup for libvirt +if [ -z "${LIBVIRT_DEFAULT_URI}" ] ; then + if [ "$(id -u)" == "0" ] || (id -g -n | grep -q "\blibvirt\b") ; then + LIBVIRT_DEFAULT_URI="qemu:///system" + export LIBVIRT_DEFAULT_URI + fi +fi + test -f "${HOME}/.profile.local" && . "${HOME}/.profile.local"