From d9108a40031ebe250fc7cc8572abfdf5932c81d2 Mon Sep 17 00:00:00 2001 From: markm Date: Mon, 28 Feb 2000 19:54:06 +0000 Subject: Get the order of things right; the keys need to be generated early to allow entropy to replenish. sshd must start late to catch the full effects of ldconfig. --- etc/network.subr | 4 ---- etc/rc | 9 +++++++++ etc/rc.d/netoptions | 4 ---- etc/rc.d/network1 | 4 ---- etc/rc.d/network2 | 4 ---- etc/rc.d/network3 | 4 ---- etc/rc.d/routing | 4 ---- etc/rc.network | 4 ---- 8 files changed, 9 insertions(+), 28 deletions(-) diff --git a/etc/network.subr b/etc/network.subr index a4992f1..69c7d89 100644 --- a/etc/network.subr +++ b/etc/network.subr @@ -608,11 +608,7 @@ network_pass3() { if [ ! -f /etc/ssh/ssh_host_key ]; then echo creating ssh host key /usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_key - echo now starting sshd - else - echo -n ' sshd'; fi - ${sshd_program:-/usr/sbin/sshd} ${sshd_flags} ;; esac diff --git a/etc/rc b/etc/rc index 2ebd36e..67c90fd 100644 --- a/etc/rc +++ b/etc/rc @@ -395,6 +395,15 @@ case ${sendmail_enable} in ;; esac +case ${sshd_enable} in +[Yy][Ee][Ss]) + if [ -x ${sshd_program:-/usr/sbin/sshd} ]; then + echo -n ' sshd'; + ${sshd_program:-/usr/sbin/sshd} ${sshd_flags} + fi + ;; +esac + case ${usbd_enable} in [Yy][Ee][Ss]) echo -n ' usbd'; /usr/sbin/usbd ${usbd_flags} diff --git a/etc/rc.d/netoptions b/etc/rc.d/netoptions index a4992f1..69c7d89 100644 --- a/etc/rc.d/netoptions +++ b/etc/rc.d/netoptions @@ -608,11 +608,7 @@ network_pass3() { if [ ! -f /etc/ssh/ssh_host_key ]; then echo creating ssh host key /usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_key - echo now starting sshd - else - echo -n ' sshd'; fi - ${sshd_program:-/usr/sbin/sshd} ${sshd_flags} ;; esac diff --git a/etc/rc.d/network1 b/etc/rc.d/network1 index a4992f1..69c7d89 100644 --- a/etc/rc.d/network1 +++ b/etc/rc.d/network1 @@ -608,11 +608,7 @@ network_pass3() { if [ ! -f /etc/ssh/ssh_host_key ]; then echo creating ssh host key /usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_key - echo now starting sshd - else - echo -n ' sshd'; fi - ${sshd_program:-/usr/sbin/sshd} ${sshd_flags} ;; esac diff --git a/etc/rc.d/network2 b/etc/rc.d/network2 index a4992f1..69c7d89 100644 --- a/etc/rc.d/network2 +++ b/etc/rc.d/network2 @@ -608,11 +608,7 @@ network_pass3() { if [ ! -f /etc/ssh/ssh_host_key ]; then echo creating ssh host key /usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_key - echo now starting sshd - else - echo -n ' sshd'; fi - ${sshd_program:-/usr/sbin/sshd} ${sshd_flags} ;; esac diff --git a/etc/rc.d/network3 b/etc/rc.d/network3 index a4992f1..69c7d89 100644 --- a/etc/rc.d/network3 +++ b/etc/rc.d/network3 @@ -608,11 +608,7 @@ network_pass3() { if [ ! -f /etc/ssh/ssh_host_key ]; then echo creating ssh host key /usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_key - echo now starting sshd - else - echo -n ' sshd'; fi - ${sshd_program:-/usr/sbin/sshd} ${sshd_flags} ;; esac diff --git a/etc/rc.d/routing b/etc/rc.d/routing index a4992f1..69c7d89 100644 --- a/etc/rc.d/routing +++ b/etc/rc.d/routing @@ -608,11 +608,7 @@ network_pass3() { if [ ! -f /etc/ssh/ssh_host_key ]; then echo creating ssh host key /usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_key - echo now starting sshd - else - echo -n ' sshd'; fi - ${sshd_program:-/usr/sbin/sshd} ${sshd_flags} ;; esac diff --git a/etc/rc.network b/etc/rc.network index a4992f1..69c7d89 100644 --- a/etc/rc.network +++ b/etc/rc.network @@ -608,11 +608,7 @@ network_pass3() { if [ ! -f /etc/ssh/ssh_host_key ]; then echo creating ssh host key /usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_key - echo now starting sshd - else - echo -n ' sshd'; fi - ${sshd_program:-/usr/sbin/sshd} ${sshd_flags} ;; esac -- cgit v1.1