diff options
author | Renato Botelho <renato@netgate.com> | 2015-10-01 10:21:43 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2015-10-01 10:21:43 -0300 |
commit | a5c36eb22154a2f17bba4329ee85627eeb64b664 (patch) | |
tree | c3bfe52067f1af8586dd85c2118cb66f55d2b227 /src/usr/local/bin | |
parent | 339b88930513dec2bc986df7c0cd7255b6815d56 (diff) | |
download | pfsense-a5c36eb22154a2f17bba4329ee85627eeb64b664.zip pfsense-a5c36eb22154a2f17bba4329ee85627eeb64b664.tar.gz |
Introduce read_xml_tag.sh
Create /usr/local/sbin/read_xml_tag.sh, that will read a xml tag from
config file using xmllint. Replace all direct read using cat, grep, sed,
... by this script
Diffstat (limited to 'src/usr/local/bin')
-rwxr-xr-x | src/usr/local/bin/beep.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/usr/local/bin/beep.sh b/src/usr/local/bin/beep.sh index ed9382d..4a7cd59 100755 --- a/src/usr/local/bin/beep.sh +++ b/src/usr/local/bin/beep.sh @@ -1,8 +1,8 @@ #!/bin/sh -BEEP=`/usr/bin/grep -c disablebeep /conf/config.xml` -if [ $BEEP -gt 0 ]; then +BEEP=$(/usr/local/sbin/read_xml_tag.sh boolean system/disablebeep) +if [ "$BEEP" = "true" ]; then exit; fi |