aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorDanilo G. Baio (dbaio) <dbaio@bsd.com.br>2014-12-24 09:49:48 -0200
committerDanilo G. Baio (dbaio) <dbaio@bsd.com.br>2014-12-24 09:49:48 -0200
commit134baa0bf035c07e1a8544754aa85066b857d5be (patch)
tree4fad8f55e455f08dad363f6b298378299a159ecc /config
parent2eba376ceba529f70929e5549d041f260b2fda71 (diff)
downloadpfsense-packages-134baa0bf035c07e1a8544754aa85066b857d5be.tar.gz
pfsense-packages-134baa0bf035c07e1a8544754aa85066b857d5be.tar.bz2
pfsense-packages-134baa0bf035c07e1a8544754aa85066b857d5be.zip
apcupsd - fix code
Diffstat (limited to 'config')
-rw-r--r--config/apcupsd/apcupsd.inc4
1 files changed, 1 insertions, 3 deletions
diff --git a/config/apcupsd/apcupsd.inc b/config/apcupsd/apcupsd.inc
index 26a2214e..c123861c 100644
--- a/config/apcupsd/apcupsd.inc
+++ b/config/apcupsd/apcupsd.inc
@@ -167,9 +167,7 @@ function sync_package_apcupsd(){
$apcupsd_start .= " if [ ! -d {$lockfile} ]; then \n";
$apcupsd_start .= " /bin/mkdir -p {$lockfile} \n";
$apcupsd_start .= " fi \n";
- $apcupsd_start .= " for X in $(/bin/ls {$lockfile} | /usr/bin/grep LCK); do \n";
- $apcupsd_start .= " /bin/rm -f {$lockfile}/\${X} \n";
- $apcupsd_start .= " done \n";
+ $apcupsd_start .= " /bin/rm -f {$lockfile}/*LCK* 2>/dev/null \n";
if ($apcupsd_config['killonpowerfail']=="on"){
$apcupsd_start .= " " . APCUPSD_BASE . "/sbin/apcupsd --kill-on-powerfail";
}else{