diff --git a/etc/network.subr b/etc/network.subr index a4992f18918..69c7d89ea08 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 2ebd36ee8c3..67c90fd88e5 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 a4992f18918..69c7d89ea08 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 a4992f18918..69c7d89ea08 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 a4992f18918..69c7d89ea08 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 a4992f18918..69c7d89ea08 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 a4992f18918..69c7d89ea08 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 a4992f18918..69c7d89ea08 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