Project

General

Profile

« Previous | Next » 

Revision 16926fdc

Added by Jim Pingle over 14 years ago

Use grep -c instead of wc and awk. Also use full paths.

View differences:

usr/local/bin/beep.sh
9 9
fi
10 10

  
11 11
# this is super annoying in VMware, exit if in VMware
12
VMWCOUNT=`dmesg -a | grep VMware | wc -l | awk '{ print $1 }'`
12
VMWCOUNT=`/usr/bin/grep -c VMware /var/log/dmesg.boot`
13 13
if [ $VMWCOUNT -gt 0 ]; then
14 14
    exit;
15 15
fi
16 16

  
17 17
# Check for different HZ 
18 18
if [ -f /boot/loader.conf ]; then
19
	HZ=`grep kern.hz /boot/loader.conf | wc -l | awk '{ print $1 }'`
19
	HZ=`/usr/bin/grep -c kern.hz /boot/loader.conf`
20 20
	if [ "$HZ" = "1" ]; then
21 21
		NOTELENGTH="10"
22 22
	fi

Also available in: Unified diff