Source-Changes-HG archive

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

[src/netbsd-8]: src/etc/rc.d Pull up following revision(s) (requested by seva...



details:   https://anonhg.NetBSD.org/src/rev/3c94ee64b039
branches:  netbsd-8
changeset: 434483:3c94ee64b039
user:      snj <snj%NetBSD.org@localhost>
date:      Sun Dec 10 09:44:48 2017 +0000

description:
Pull up following revision(s) (requested by sevan in ticket #420):
        etc/rc.d/sshd: revision 1.25
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 3bf1889adb2d -r 3c94ee64b039 etc/rc.d/sshd
--- a/etc/rc.d/sshd     Sun Dec 10 09:41:31 2017 +0000
+++ b/etc/rc.d/sshd     Sun Dec 10 09:44:48 2017 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: sshd,v 1.23.8.1 2017/12/04 10:59:46 snj Exp $
+# $NetBSD: sshd,v 1.23.8.2 2017/12/10 09:44:48 snj 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