From 26ba67b0e7e85044927d4c0ffbf08c44cb86497c Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Wed, 26 Aug 2015 11:35:35 +0200 Subject: [PATCH] add inspection of resolv.conf after network startup - f22 test node has an empty resolv.conf w/ a static config --- initscripts/pl_netinit | 50 +++++++++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 18 deletions(-) diff --git a/initscripts/pl_netinit b/initscripts/pl_netinit index 8adf563..3f253a2 100755 --- a/initscripts/pl_netinit +++ b/initscripts/pl_netinit @@ -350,23 +350,37 @@ echo $(date "+%H:%M:%S") " pl_netinit: attempting to start networking" echo $(date "+%H:%M:%S") " pl_netinit: network online" -echo "BEG post pl_netinit forensics" - -file=/root/.ssh/authorized_keys -echo "$file" -if ! [ -f "$file" ]; then - echo "!!!!!!!!!! missing $file" -else - echo "---------- $file" - cat $file -fi +function pl_netinit_forensics () { -file="/etc/ssh/sshd_config" -if ! [ -f "$file" ]; then - echo "!!!!!!!!!! missing $file" -else - echo '---------- egrep Pass|Auth|PAM|Root' $file - grep -v '^#' $file | egrep 'Pass|Auth|PAM|Root' -fi + echo "-------------------- BEG post pl_netinit forensics" + + file=/root/.ssh/authorized_keys + echo "$file" + if ! [ -f "$file" ]; then + echo "!!!!!!!!!! missing $file" + else + echo "---------- $file" + cat $file + fi + + file="/etc/ssh/sshd_config" + if ! [ -f "$file" ]; then + echo "!!!!!!!!!! missing $file" + else + echo '---------- egrep Pass|Auth|PAM|Root' $file + grep -v '^#' $file | egrep 'Pass|Auth|PAM|Root' + fi + + # on f22 we see an emty resolv.conf... + file=/etc/resolv.conf + if ! [ -f "$file" ]; then + echo "!!!!!!!!!! missing $file" + else + echo "---------- $file" + cat $file + fi + + echo "-------------------- END post pl_netinit forensics" +} -echo "END post pl_netinit forensics" +pl_netinit_forensics -- 2.43.0