diff options
author | mboelen <michael@cisofy.com> | 2015-03-09 16:09:59 +0300 |
---|---|---|
committer | mboelen <michael@cisofy.com> | 2015-03-09 16:09:59 +0300 |
commit | c8e17e317d32c763687f2162aad3c542799b0870 (patch) | |
tree | 426bdfa2004a0221b44d94a2b45ed5ee8a886e77 | |
parent | 215ed82899bcfef854defb594c1c75bfa61bd250 (diff) |
Redirect sysctl error output
-rw-r--r-- | include/functions | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/functions b/include/functions index f4178793..94979c23 100644 --- a/include/functions +++ b/include/functions @@ -500,6 +500,12 @@ 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 @@ -598,7 +604,7 @@ # NetBSD: machdep.dmi.system-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 # Check if we catched some string along all tests @@ -777,6 +783,10 @@ ;; # Headers 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) NGINX_ALIAS_FOUND=1 @@ -859,6 +869,7 @@ ;; ssl_protocols) NGINX_SSL_PROTOCOLS=1 + #report "nginx_ssl_protocols=${VALUE}" ;; ssl_session_cache) ;; |