From c396369f2f38e6eefb2800de38b6a0a6bd3f205e Mon Sep 17 00:00:00 2001 From: "Matthieu Baerts (NGI0)" Date: Thu, 14 Mar 2024 18:47:25 +0100 Subject: [PATCH] init: set the HOME env var if root When virtme-ng was running as root, the HOME dir was set to '/'. Now it is set to '/root', the expected value. Fixes: bcd99d9 ("virtme-init: docker host support") Signed-off-by: Matthieu Baerts (NGI0) --- virtme/guest/virtme-init | 2 ++ 1 file changed, 2 insertions(+) diff --git a/virtme/guest/virtme-init b/virtme/guest/virtme-init index 5913098..f45d4ee 100755 --- a/virtme/guest/virtme-init +++ b/virtme/guest/virtme-init @@ -388,6 +388,8 @@ if [[ ! -n "${virtme_root_user}" ]]; then install -d -m 0755 /tmp/roothome export HOME=/tmp/roothome mount --bind /tmp/roothome /root +else + export HOME=/root fi # $XDG_RUNTIME_DIR defines the base directory relative to which user-specific