gluon-luci-admin: ensure that the authorized_keys file always ends with a newline
Fixes #558
This commit is contained in:
parent
4d6956fa25
commit
145cb4ded2
@ -44,7 +44,7 @@ if fs.access("/etc/config/dropbear") then
|
|||||||
|
|
||||||
function keys.write(self, section, value)
|
function keys.write(self, section, value)
|
||||||
if value then
|
if value then
|
||||||
fs.writefile("/etc/dropbear/authorized_keys", value:gsub("\r\n", "\n"))
|
fs.writefile("/etc/dropbear/authorized_keys", value:gsub("\r\n", "\n"):trim() .. "\n")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user