Date: Thu, 28 Feb 2013 12:03:17 +0000 (UTC) From: Dag-Erling Smørgrav <des@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247461 - stable/9/etc/rc.d Message-ID: <201302281203.r1SC3HYt079587@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302281203.r1SC3HYt079587>