Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Jul 2024 09:17:17 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: 7aecd689e362 - main - nuageinit: Fix the homedir variable name
Message-ID:  <202407250917.46P9HHu3089763@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=7aecd689e362330a035a199afbe5707a8c4edc9c

commit 7aecd689e362330a035a199afbe5707a8c4edc9c
Author:     Jose Luis Duran <jlduran@gmail.com>
AuthorDate: 2024-07-23 19:54:54 +0000
Commit:     Baptiste Daroussin <bapt@FreeBSD.org>
CommitDate: 2024-07-25 09:15:29 +0000

    nuageinit: Fix the homedir variable name
    
    cloud-init uses homedir, not home.
---
 libexec/nuageinit/nuage.lua | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libexec/nuageinit/nuage.lua b/libexec/nuageinit/nuage.lua
index 10451dc0bdc4..cca1fe9b4678 100644
--- a/libexec/nuageinit/nuage.lua
+++ b/libexec/nuageinit/nuage.lua
@@ -86,8 +86,8 @@ local function adduser(pwd)
 	if not pwd.gecos then
 		pwd.gecos = pwd.name .. " User"
 	end
-	if not pwd.home then
-		pwd.home = "/home/" .. pwd.name
+	if not pwd.homedir then
+		pwd.homedir = "/home/" .. pwd.name
 	end
 	local extraargs=""
 	if pwd.groups then
@@ -120,7 +120,7 @@ local function adduser(pwd)
 	end
 	cmd = cmd .. "useradd -n ".. pwd.name .. " -M 0755 -w none "
 	cmd = cmd .. extraargs .. " -c '".. pwd.gecos
-	cmd = cmd .. "' -d '" .. pwd.home .. "' -s "..pwd.shell .. postcmd
+	cmd = cmd .. "' -d '" .. pwd.homedir .. "' -s "..pwd.shell .. postcmd
 
 	local r = os.execute(cmd)
 	if not r then
@@ -136,7 +136,7 @@ local function adduser(pwd)
 		cmd = cmd .. "lock " .. pwd.name
 		os.execute(cmd)
 	end
-	return pwd.home
+	return pwd.homedir
 end
 
 local function addgroup(grp)



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