diff options
-rwxr-xr-x | etc/sshd | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -44,6 +44,13 @@ return $size; } + /* restore ssh data for nanobsd platform */ + if($g['platform'] == "nanobsd" and file_exists("/config/ssh/ssh_host_key")) { + if(!file_exists("/etc/ssh/sshd_host_key.pub")) { + cp("/config/ssh/* /etc/ssh/"); + } + } + /* if any of these files are 0 bytes then they are corrupted. * remove them */ @@ -180,6 +187,13 @@ echo "done.\n"; } + // NanoBSD + if($g['platform'] == "nanobsd") { + if(!is_dir("/config/sshd")) + exec("mkdir /config/sshd"); + exec("cp /etc/ssh/ssh_host* /config/sshd"); + } + conf_mount_ro(); |