git: fa07b02f6e09 - main - nuageinit: make addsshkey friendly for testsuite
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 05 Jun 2024 09:03:07 UTC
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)