Module Name: src
Committed By: kre
Date: Mon Dec 4 14:50:33 UTC 2017
Modified Files:
src/etc/rc.d: sshd
Log Message:
Do away with (not well specified, even if it happens to work) absurd
15 arg test ([ ]) expression, and replace it with several well defined
2 arg tests, combined with (also well defined) sh syntax.
To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/etc/rc.d/sshd
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/etc/rc.d/sshd
diff -u src/etc/rc.d/sshd:1.24 src/etc/rc.d/sshd:1.25
--- src/etc/rc.d/sshd:1.24 Sat Oct 7 21:41:51 2017
+++ src/etc/rc.d/sshd Mon Dec 4 14:50:33 2017
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: sshd,v 1.24 2017/10/07 21:41:51 sevan Exp $
+# $NetBSD: sshd,v 1.25 2017/12/04 14:50:33 kre Exp $
#
# PROVIDE: sshd
@@ -45,10 +45,10 @@ _EOF
sshd_precmd()
{
- if [ ! -f /etc/ssh/ssh_host_dsa_key -o \
- ! -f /etc/ssh/ssh_host_ecdsa_key -o \
- ! -f /etc/ssh/ssh_host_ed25519_key -o \
- ! -f /etc/ssh/ssh_host_rsa_key ]; then
+ if ! [ -f /etc/ssh/ssh_host_dsa_key ] ||
+ ! [ -f /etc/ssh/ssh_host_ecdsa_key ] ||
+ ! [ -f /etc/ssh/ssh_host_ed25519_key ] ||
+ ! [ -f /etc/ssh/ssh_host_rsa_key ]; then
run_rc_command keygen
fi
}