diff options
author | Renato Botelho <garga@FreeBSD.org> | 2014-08-22 10:53:39 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2014-08-22 10:53:39 -0300 |
commit | 8c366060e3646cdf6eadc1d2dcec91e78d7be88e (patch) | |
tree | fcf37d8dba1d2444d1e8eb9608809c647e6356b8 | |
parent | b075c1e2e95891d1ded35b81581f20b897696987 (diff) | |
download | pfsense-8c366060e3646cdf6eadc1d2dcec91e78d7be88e.zip pfsense-8c366060e3646cdf6eadc1d2dcec91e78d7be88e.tar.gz |
pgrep parameters are out of order and it also needs -a to find sshd. While I'm here, simplify sh syntax and prevent noise to be printed if pid file doesn't exist
-rwxr-xr-x | etc/rc.initial | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/etc/rc.initial b/etc/rc.initial index 8388f71..2277280 100755 --- a/etc/rc.initial +++ b/etc/rc.initial @@ -62,8 +62,7 @@ product=`grep product_name /etc/inc/globals.inc | cut -d'"' -f4` hidebanner=`grep hidebanner /etc/inc/globals.inc | cut -d'"' -f4` # Check to see if SSH is running. -SSHD=`/bin/pgrep sshd -F /var/run/sshd.pid` -if [ "$?" == "0" ]; then +if pgrep -q -a -F /var/run/sshd.pid sshd >/dev/null 2>&1; then sshd_option="14) Disable Secure Shell (sshd)"; else sshd_option="14) Enable Secure Shell (sshd)"; |