summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xetc/sshd14
1 files changed, 14 insertions, 0 deletions
diff --git a/etc/sshd b/etc/sshd
index 12f3fed..f0611b4 100755
--- a/etc/sshd
+++ b/etc/sshd
@@ -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();
OpenPOWER on IntegriCloud