From afb2683350af9c66cf6708955f2af3016633c41b Mon Sep 17 00:00:00 2001 From: "Danilo G. Baio (dbaio)" Date: Mon, 14 Apr 2014 15:26:52 -0300 Subject: apcupsd - fix lock file when using usb devices --- config/apcupsd/apcupsd.inc | 3 +++ config/apcupsd/apcupsd.xml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'config/apcupsd') diff --git a/config/apcupsd/apcupsd.inc b/config/apcupsd/apcupsd.inc index a2b8d2ff..95abeca8 100644 --- a/config/apcupsd/apcupsd.inc +++ b/config/apcupsd/apcupsd.inc @@ -163,6 +163,9 @@ function sync_package_apcupsd(){ $apcupsd_rcfile="/usr/local/etc/rc.d/apcupsd.sh"; if (is_array($apcupsd_config) && $apcupsd_config['apcupsdenabled']=="on"){ $apcupsd_start = "echo \"Starting APC UPS Daemon...\"\n"; + $apcupsd_start .= " if [ -f /var/spool/lock/LCK.. ]; then \n"; + $apcupsd_start .= " /bin/rm -f /var/spool/lock/LCK.. \n"; + $apcupsd_start .= " fi \n"; if ($apcupsd_config['killonpowerfail']=="on"){ $apcupsd_start .= " " . APCUPSD_BASE . "/sbin/apcupsd --kill-on-powerfail"; }else{ diff --git a/config/apcupsd/apcupsd.xml b/config/apcupsd/apcupsd.xml index e69344fc..f9003a61 100644 --- a/config/apcupsd/apcupsd.xml +++ b/config/apcupsd/apcupsd.xml @@ -40,7 +40,7 @@ Apcupsd Services: Apcupsd (General) Monitoring - 0.2 + 0.3 /usr/local/pkg/apcupsd.inc Apcupsd has been created/modified. Apcupsd has been deleted. -- cgit v1.2.3