simplify rc_pre(); this uses rm -f which returns a successful exit code
even if the file doesn't exist, so no need to explicitly test for its presence. from rpe, ok ajacoutot@
This commit is contained in:
parent
668f1ff16a
commit
c033eddb06
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.15 2011/11/28 10:46:19 sthen Exp $
|
||||
# $OpenBSD: Makefile,v 1.16 2012/08/27 13:39:59 sthen Exp $
|
||||
|
||||
COMMENT-main = daemon for controlling APC UPSes
|
||||
COMMENT-cgi = CGI scripts for web monitoring
|
||||
@ -8,7 +8,7 @@ DISTNAME = apcupsd-3.14.10
|
||||
PKGNAME-main = ${DISTNAME}
|
||||
PKGNAME-cgi = ${DISTNAME:S/-/-cgi-/}
|
||||
PKGNAME-x11 = ${DISTNAME:S/-/-x11-/}
|
||||
REVISION-main = 0
|
||||
REVISION-main = 1
|
||||
REVISION-cgi = 0
|
||||
REVISION-x11 = 0
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $OpenBSD: apcupsd.rc,v 1.2 2011/11/28 10:46:19 sthen Exp $
|
||||
# $OpenBSD: apcupsd.rc,v 1.3 2012/08/27 13:39:59 sthen Exp $
|
||||
|
||||
daemon="${TRUEPREFIX}/sbin/apcupsd"
|
||||
daemon_flags="--kill-on-powerfail"
|
||||
@ -10,9 +10,7 @@ daemon_flags="--kill-on-powerfail"
|
||||
rc_reload=NO
|
||||
|
||||
rc_pre() {
|
||||
if [ -f ${SYSCONFDIR}/powerfail ]; then
|
||||
rm -f ${SYSCONFDIR}/powerfail
|
||||
fi
|
||||
rm -f ${SYSCONFDIR}/powerfail
|
||||
}
|
||||
|
||||
rc_cmd $1
|
||||
|
Loading…
Reference in New Issue
Block a user