summaryrefslogtreecommitdiffstats
path: root/usr/local/bin
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2010-11-29 18:38:17 -0500
committerjim-p <jimp@pfsense.org>2010-11-29 18:38:17 -0500
commit16926fdccc339db15311fd351274f453cc35df35 (patch)
tree085b3a33f1ff4b73478dea48ec7ad992e94ff299 /usr/local/bin
parentac617a8ffac35d5a5061d3392d418114a70a0684 (diff)
downloadpfsense-16926fdccc339db15311fd351274f453cc35df35.zip
pfsense-16926fdccc339db15311fd351274f453cc35df35.tar.gz
Use grep -c instead of wc and awk. Also use full paths.
Diffstat (limited to 'usr/local/bin')
-rwxr-xr-xusr/local/bin/beep.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr/local/bin/beep.sh b/usr/local/bin/beep.sh
index 43f893a..febb222 100755
--- a/usr/local/bin/beep.sh
+++ b/usr/local/bin/beep.sh
@@ -9,14 +9,14 @@ if [ "$PFSENSETYPE" = "embedded" ]; then
fi
# this is super annoying in VMware, exit if in VMware
-VMWCOUNT=`dmesg -a | grep VMware | wc -l | awk '{ print $1 }'`
+VMWCOUNT=`/usr/bin/grep -c VMware /var/log/dmesg.boot`
if [ $VMWCOUNT -gt 0 ]; then
exit;
fi
# Check for different HZ
if [ -f /boot/loader.conf ]; then
- HZ=`grep kern.hz /boot/loader.conf | wc -l | awk '{ print $1 }'`
+ HZ=`/usr/bin/grep -c kern.hz /boot/loader.conf`
if [ "$HZ" = "1" ]; then
NOTELENGTH="10"
fi
OpenPOWER on IntegriCloud