diff options
Diffstat (limited to 'config/apcupsd/apcupsd.inc')
-rw-r--r-- | config/apcupsd/apcupsd.inc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/config/apcupsd/apcupsd.inc b/config/apcupsd/apcupsd.inc index 3340738a..26a2214e 100644 --- a/config/apcupsd/apcupsd.inc +++ b/config/apcupsd/apcupsd.inc @@ -167,9 +167,9 @@ function sync_package_apcupsd(){ $apcupsd_start .= " if [ ! -d {$lockfile} ]; then \n"; $apcupsd_start .= " /bin/mkdir -p {$lockfile} \n"; $apcupsd_start .= " fi \n"; - $apcupsd_start .= " if [ -f {$lockfile}/LCK.. ]; then \n"; - $apcupsd_start .= " /bin/rm -f {$lockfile}/LCK.. \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"; if ($apcupsd_config['killonpowerfail']=="on"){ $apcupsd_start .= " " . APCUPSD_BASE . "/sbin/apcupsd --kill-on-powerfail"; }else{ |