Skip to content
Snippets Groups Projects
Commit 145cb4de authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

gluon-luci-admin: ensure that the authorized_keys file always ends with a newline

Fixes #558
parent 4d6956fa
No related branches found
No related tags found
No related merge requests found
...@@ -44,7 +44,7 @@ if fs.access("/etc/config/dropbear") then ...@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment