svn commit: r247461 - stable/9/etc/rc.d
Dag-Erling Smørgrav
des at FreeBSD.org
Thu Feb 28 12:03:17 UTC 2013
Author: des
Date: Thu Feb 28 12:03:17 2013
New Revision: 247461
URL: http://svnweb.freebsd.org/changeset/base/247461
Log:
MFH (r240109): add a configtest command
Modified:
stable/9/etc/rc.d/sshd
Directory Properties:
stable/9/etc/ (props changed)
Modified: stable/9/etc/rc.d/sshd
==============================================================================
--- stable/9/etc/rc.d/sshd Thu Feb 28 11:27:01 2013 (r247460)
+++ stable/9/etc/rc.d/sshd Thu Feb 28 12:03:17 2013 (r247461)
@@ -14,8 +14,9 @@ rcvar="sshd_enable"
command="/usr/sbin/${name}"
keygen_cmd="sshd_keygen"
start_precmd="sshd_precmd"
+configtest_cmd="sshd_configtest"
pidfile="/var/run/${name}.pid"
-extra_commands="keygen reload"
+extra_commands="configtest keygen reload"
timeout=300
@@ -87,6 +88,12 @@ sshd_keygen()
)
}
+sshd_configtest()
+{
+ echo "Performing sanity check on ${name} configuration."
+ eval ${command} ${sshd_flags} -t
+}
+
sshd_precmd()
{
if [ ! -f /etc/ssh/ssh_host_key -o \
@@ -96,6 +103,7 @@ sshd_precmd()
user_reseed
run_rc_command keygen
fi
+ sshd_configtest
}
load_rc_config $name
More information about the svn-src-stable-9
mailing list