Redirect sysctl error output

This commit is contained in:
mboelen 2015-03-09 14:09:59 +01:00
parent 215ed82899
commit c8e17e317d

View File

@ -500,6 +500,12 @@
fi fi
fi fi
# Create host ID when a MAC address was not found
#SSH_KEY_FILES="ssh_host_ecdsa_key ssh_host_ecdsa_key.pub ssh_host_dsa_key ssh_host_dsa_key.pub ssh_host_rsa_key ssh_host_rsa_key.pub"
#for I in ${SSH_KEY_FILES}; do
#done
} }
# Insert section block # Insert section block
@ -598,7 +604,7 @@
# NetBSD: machdep.dmi.system-product # NetBSD: machdep.dmi.system-product
# OpenBSD: hw.product # OpenBSD: hw.product
SHORT=`sysctl -a | egrep "(hw.product|machdep.dmi.system-product)" | head -1 | sed 's/ = /=/' | awk -F= '{ print $2 }'` SHORT=`sysctl -a | egrep "(hw.product|machdep.dmi.system-product)" 2> /dev/null | head -1 | sed 's/ = /=/' | awk -F= '{ print $2 }'`
fi fi
# Check if we catched some string along all tests # Check if we catched some string along all tests
@ -777,6 +783,10 @@
;; ;;
# Headers # Headers
add_header) add_header)
HEADER=`echo ${VALUE} | awk '{ print $1 }'`
HEADER_VALUE=`echo ${VALUE} | cut -d' ' -f2-`
logtext "Result: found header ${HEADER} with value ${HEADER_VALUE}"
#report "nginx_header[]=${HEADER}|${HEADER_VALUE}|"
;; ;;
alias) alias)
NGINX_ALIAS_FOUND=1 NGINX_ALIAS_FOUND=1
@ -859,6 +869,7 @@
;; ;;
ssl_protocols) ssl_protocols)
NGINX_SSL_PROTOCOLS=1 NGINX_SSL_PROTOCOLS=1
#report "nginx_ssl_protocols=${VALUE}"
;; ;;
ssl_session_cache) ssl_session_cache)
;; ;;