Skip to content

Commit

Permalink
init: set the HOME env var if root
Browse files Browse the repository at this point in the history
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) <matttbe@kernel.org>
  • Loading branch information
matttbe committed Mar 15, 2024
1 parent 27f75b6 commit c396369
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions virtme/guest/virtme-init
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c396369

Please sign in to comment.