Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 7778 | Differences between
and this patch

Collapse All | Expand All

(-)apcupsd-3.9.9-orig/platforms/gentoo/Makefile.in (+28 lines)
Line 0 Link Here
1
# Makefile template
2
#
3
# Copyright (C) 1999-2002 Riccardo Facchetti <riccardo@master.oasi.gpa.it>
4
#
5
6
# Default variables
7
@VARIABLES@
8
# TOP source directory.
9
topdir = @top_srcdir@
10
top_builddir = $(topdir)
11
12
# Include the default make targets: to be put before the all-targets: rule.
13
@TARGETS@
14
15
all-targets: Makefile
16
17
install:
18
	@echo "Installing apcupsd boot script..."
19
	$(INSTALL_PROGRAM) -m 744 apcupsd /etc/init.d/apcupsd
20
21
uninstall:
22
	@echo "Removing boot script..."
23
	@rm -f /etc/init.d/apcupsd
24
25
clean:
26
27
distclean:
28
	@rm -f apcupsd Makefile 
(-)apcupsd-3.9.9-orig/platforms/gentoo/apcupsd.in (+48 lines)
Line 0 Link Here
1
#! /bin/sh
2
# Copyright (c) 1996 S.u.S.E. Gmbh Fuerth, Germany.  All rights reserved.
3
#
4
# Author: Andre Hedrick <hedrick@astro.dyer.vanderbilt.edu>
5
#
6
# apcupsd startup script
7
#
8
9
. /etc/rc.conf
10
11
test "$START_APCUPSD" = yes || exit 0
12
13
return=$rc_done
14
15
APCPID=@PIDDIR@/apcupsd.pid
16
APCUPSD=@sbindir@/apcupsd
17
18
case "$1" in
19
    start)
20
        rm -f @PWRFAILDIR@/powerfail
21
        rm -f @nologdir@/nologin
22
        echo -n "Starting apcupsd power management"
23
        $APCUPSD || return=$rc_failed
24
        echo -e "$return"
25
    ;;
26
    stop)
27
        echo -n "Stopping apcupsd power management"
28
        if [ -f $APCPID ]; then
29
                kill $(cat $APCPID) || return=$rc_failed
30
                rm -f $APCPID
31
        else
32
                return=$rc_failed
33
        fi
34
        echo -e "$return"
35
    ;;
36
    restart)
37
        $0 stop
38
        $0 start
39
    ;;
40
    status)
41
        @sbindir@/apcaccess status
42
    ;;
43
    *)
44
    echo "Usage: $0 {start|stop|restart|status}"
45
    exit 1
46
esac
47
48
exit 0

Return to bug 7778