nuageinit: improve debugging when mkdir fails

This commit is contained in:
Baptiste Daroussin 2024-08-20 12:05:25 +02:00
parent 19fb9ad746
commit a6ecbf2b35
1 changed files with 1 additions and 4 deletions

View File

@ -188,10 +188,7 @@ local function addsshkey(homedir, key)
chownak = true
dirattrs = lfs.attributes(dotssh_path)
if dirattrs == nil then
if not lfs.mkdir(dotssh_path) then
warnmsg("nuageinit: impossible to create ".. dotssh_path)
return
end
assert(lfs.mkdir(dotssh_path))
chowndotssh = true
dirattrs = lfs.attributes(homedir)
end