Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/etc/rc.d Do away with (not well specified, even if it happen...



details:   https://anonhg.NetBSD.org/src/rev/8dc0513d3280
branches:  trunk
changeset: 828245:8dc0513d3280
user:      kre <kre%NetBSD.org@localhost>
date:      Mon Dec 04 14:50:33 2017 +0000

description:
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.

diffstat:

 etc/rc.d/sshd |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (26 lines):

diff -r cfa588e71cc0 -r 8dc0513d3280 etc/rc.d/sshd
--- a/etc/rc.d/sshd     Mon Dec 04 12:53:46 2017 +0000
+++ b/etc/rc.d/sshd     Mon Dec 04 14:50:33 2017 +0000
@@ -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 @@
 
 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
 }



Home | Main Index | Thread Index | Old Index