소스 검색

gluon-luci-admin: fix SSH keys being removed when a password is set

Matthias Schiffer 9 년 전
부모
커밋
7496b3d3c1
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      package/gluon-luci-admin/files/usr/lib/lua/luci/model/cbi/admin/remote.lua

+ 3 - 1
package/gluon-luci-admin/files/usr/lib/lua/luci/model/cbi/admin/remote.lua

@@ -51,7 +51,9 @@ if fs.access("/etc/config/dropbear") then
   end
 
   function keys.remove(self, section)
-    fs.remove("/etc/dropbear/authorized_keys")
+    if keys:formvalue("_keys") then
+      fs.remove("/etc/dropbear/authorized_keys")
+    end
   end
 end