diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-03-13 01:02:12 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-03-13 01:02:12 +0000 |
commit | 0a59b11baa07a3331df125638d09fc13d48a3f5c (patch) | |
tree | 6195584f645ff6edb67f07a693f3907d588e2441 /packages/carp_settings.xml | |
parent | 68fcf49a318a41447e09670669569f49bf9bd292 (diff) | |
download | pfsense-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.xml | 11 |
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> |