-function pl_network_sanity_checks () {
- echo $(date "+%H:%M:%S") " ======================================== BEG SANITY CHECKS"
- for file in $(ls /etc/resolv.conf /etc/sysconfig/network-scripts/ifcfg-eth* ) ; do
- verbose_run_command cat $file
+function verbose-file() {
+ file=$1; shift
+ echo "$file"
+ if ! [ -f "$file" ]; then
+ verbose-message "!!!!!!!!!! missing $file"
+ else
+ verbose-run cat $file
+ fi
+}
+
+function verbose-file-uncommented-patterns () {
+ file=$1; shift
+ egrep_pattern=$2; shift
+
+ if ! [ -f "$file" ]; then
+ verbose-message "!!!!!!!!!! missing $file"
+ else
+ echo '---------- egrep $egrep_pattern' $file
+ grep -v '^#' $file | egrep "$egrep_pattern"
+ fi
+}
+
+function verbose-forensics () {
+ message="$1"; shift
+ verbose-message "BEG FORENSICS -- $message"
+ verbose-run dmesg
+ verbose-run lsmod
+ verbose-run lspci
+
+ # XXX : need to check for a running udev
+
+ for file in /etc/resolv.conf /run/resolvconf/resolv.conf /etc/sysconfig/network-scripts/ifcfg-eth*; do
+ verbose-file $file