Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Jun 2024 09:03:07 GMT
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: fa07b02f6e09 - main - nuageinit: make addsshkey friendly for testsuite
Message-ID:  <202406050903.455937l5093401@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by bapt:

URL: https://cgit.FreeBSD.org/src/commit/?id=fa07b02f6e09f776b3afe5709e8fee1764c11a2a

commit fa07b02f6e09f776b3afe5709e8fee1764c11a2a
Author:     Baptiste Daroussin <bapt@FreeBSD.org>
AuthorDate: 2024-06-05 08:44:17 +0000
Commit:     Baptiste Daroussin <bapt@FreeBSD.org>
CommitDate: 2024-06-05 09:00:53 +0000

    nuageinit: make addsshkey friendly for testsuite
---
 libexec/nuageinit/nuage.lua | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libexec/nuageinit/nuage.lua b/libexec/nuageinit/nuage.lua
index 020b54b0776c..ca70c778791b 100644
--- a/libexec/nuageinit/nuage.lua
+++ b/libexec/nuageinit/nuage.lua
@@ -177,6 +177,10 @@ end
 local function addsshkey(homedir, key)
 	local chownak = false
 	local chowndotssh = false
+	local root = os.getenv("NUAGE_FAKE_ROOTDIR")
+	if root then
+		homedir = root .. "/" .. homedir
+	end
 	local ak_path = homedir .. "/.ssh/authorized_keys"
 	local dotssh_path = homedir .. "/.ssh"
 	local dirattrs = lfs.attributes(ak_path)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202406050903.455937l5093401>