From 134baa0bf035c07e1a8544754aa85066b857d5be Mon Sep 17 00:00:00 2001 From: "Danilo G. Baio (dbaio)" Date: Wed, 24 Dec 2014 09:49:48 -0200 Subject: apcupsd - fix code --- config/apcupsd/apcupsd.inc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'config/apcupsd') 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{ -- cgit v1.2.3