summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1999-10-07 04:41:07 +0000
committerderaadt <deraadt@openbsd.org>1999-10-07 04:41:07 +0000
commit8b6b3eb8b88e65336022e258e14e44f8082a4cdf (patch)
treec29a44495bc28a550309f4421830916c210a431d
parentadd -Q flag: says whether ssh RSA check should whine on stdout (diff)
downloadwireguard-openbsd-8b6b3eb8b88e65336022e258e14e44f8082a4cdf.tar.xz
wireguard-openbsd-8b6b3eb8b88e65336022e258e14e44f8082a4cdf.zip
if sshd startup fails due to rsa not being there, start up
/usr/local/sbin/sshd instead, if it is there.
-rw-r--r--etc/rc11
1 files changed, 8 insertions, 3 deletions
diff --git a/etc/rc b/etc/rc
index 158652ce153..8ae6e975416 100644
--- a/etc/rc
+++ b/etc/rc
@@ -1,4 +1,4 @@
-# $OpenBSD: rc,v 1.118 1999/10/06 04:41:46 millert Exp $
+# $OpenBSD: rc,v 1.119 1999/10/07 04:41:07 deraadt Exp $
# System startup script run by init on autoboot
# or after single-user.
@@ -490,8 +490,13 @@ if [ "X${mopd_flags}" != X"NO" -a -d /tftpboot/mop ]; then
fi
if [ X"${sshd}" == X"YES" -a -x /usr/sbin/sshd ]; then
- echo -n ' sshd'; /usr/sbin/sshd
- #echo -n ' sshd(2022)'; /usr/sbin/sshd -p 2022
+ if /usr/sbin/sshd -Q ; then
+ echo -n ' sshd';
+ #echo -n ' sshd(2022)'; /usr/sbin/sshd -p 2022
+ elif [ -f /usr/local/sbin/sshd ]; then
+ /usr/local/sbin/sshd
+ echo -n ' sshd';
+ fi
fi
echo '.'