next message in archive
no next message in thread
previous message in archive
previous message in thread
Index of Subjects
Index of Subjects The $SYSPROC should be quoted. the ps args are also non-portable, at least to Solaris, so there should be an envariable for those options (on Solaris it should be set to "-ef" On Fri, 6 Dec 1996, Landon Boyd wrote: > > 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 > ================================================================== > > David Trueman, Systems Manager, Dalhousie Math, Stats and Computing Science Technical Chair, Chebucto Community Net
next message in archive
no next message in thread
previous message in archive
previous message in thread
Index of Subjects