aboutsummaryrefslogtreecommitdiffstats
path: root/packages/carp_settings.xml
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-03-13 01:02:12 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-03-13 01:02:12 +0000
commit0a59b11baa07a3331df125638d09fc13d48a3f5c (patch)
tree6195584f645ff6edb67f07a693f3907d588e2441 /packages/carp_settings.xml
parent68fcf49a318a41447e09670669569f49bf9bd292 (diff)
downloadpfsense-packages-0a59b11baa07a3331df125638d09fc13d48a3f5c.tar.gz
pfsense-packages-0a59b11baa07a3331df125638d09fc13d48a3f5c.tar.bz2
pfsense-packages-0a59b11baa07a3331df125638d09fc13d48a3f5c.zip
Write out /root/.ssh/known_hosts and /root/.ssh/authorized_keys
Diffstat (limited to 'packages/carp_settings.xml')
-rw-r--r--packages/carp_settings.xml11
1 files changed, 11 insertions, 0 deletions
diff --git a/packages/carp_settings.xml b/packages/carp_settings.xml
index befd3049..fce0262d 100644
--- a/packages/carp_settings.xml
+++ b/packages/carp_settings.xml
@@ -118,6 +118,17 @@
<custom_delete_php_command>
</custom_delete_php_command>
<custom_php_install_command>
+ system("/bin/mkdir -p /root/.ssh");
+ if($_POST['knownhosts'] != "") {
+ $fout = fopen("/root/.ssh/known_hosts","w");
+ fwrite($fout, $_POST['knownhosts']);
+ fclose($fout);
+ }
+ if($_POST['authorizedkeys'] != "") {
+ $fout = fopen("/root/.ssh/authorized_keys","w");
+ fwrite($fout, $_POST['authorizedkeys']);
+ fclose($fout);
+ }
</custom_php_install_command>
<custom_php_deinstall_command>
</custom_php_deinstall_command>