next message in archive
next message in thread
previous message in archive
Index of Subjects
systat currently has some portability problems. These are:
if [ `ps uaxw | egrep 'syslogd|inetd|router|scheduler|smtpserver' | wc -l`
-lt 6 ] || [ `ps uaxw | egrep httpd | wc -l` -lt 1 ]; then
echo "Some important system processes are not running!"
status=`expr $status + 1`
fi
Could we change this to
fields=`echo $SYSPROC|gawk -F'|' '{print NF}'`
if [ `ps uaxw | egrep $SYSPROC | wc -l` -lt fields ] ; then
echo "Some important system processes are not running!"
status=`expr $status + 1`
fi
Where $SYSPROC would be set up in vars to be a '|' separated list of
important system processes.
==================================================================
Landon Boyd landon@chebucto.ns.ca
Distribution Support Technician, http://chebucto.ns.ca/~landon
Chebucto Community Net 902-455-4099hm 902-494-2449wk
==================================================================
next message in archive
next message in thread
previous message in archive
Index of Subjects