4 include $(topdir
)/autoconf
/targets.mak
6 all-install
: install-suse
7 all-uninstall
: uninstall-suse
11 # unlink old rc script (if not doing a DESTDIR install)
12 $(call CHKCFG
,del
,/etc
/rc.d
/apcupsd
)
13 # install new rc script
14 $(call MKDIR
,/etc
/rc.d
)
15 $(call INSTDATA
,744,apcupsd
,/etc
/rc.d
)
16 # save old halt script
17 $(call COPY
,/etc
/rc.d
/halt
,/etc
/rc.d
/halt.old
)
18 # insert apcupsd callout into halt script
19 @echo
" PATCH" $(DESTDIR
)/etc
/rc.d
/halt
20 $(V
)awk
-f awkhaltprog
$(DESTDIR
)/etc
/rc.d
/halt.old
>$(DESTDIR
)/etc
/rc.d
/halt
21 $(V
)chmod
744 $(DESTDIR
)/etc
/rc.d
/halt
22 # link new rc script (if not doing a DESTDIR install)
23 $(call CHKCFG
,add
,/etc
/rc.d
/apcupsd
)
24 @echo
"================================================="
25 @echo
"apcupsd script installation for SuSE $(DISTVER) complete."
27 @echo
"You should now edit /etc/apcupsd/apcupsd.conf to correspond"
28 @echo
"to your setup then start the apcupsd daemon with:"
30 @echo
"/etc/rc.d/apcupsd start"
32 @echo
"thereafter when you reboot, it will be stopped and started"
33 @echo
"automatically."
35 @echo
"Please check that your halt script in:"
36 @echo
" /etc/rc.d/halt"
37 @echo
"was properly updated (see installation section of manual)"
38 @echo
"================================================="
41 # unlink old rc script (if not doing a DESTDIR install)
42 -$(call CHKCFG
,del
,/etc
/rc.d
/apcupsd
)
43 -$(call UNINST
,/etc
/rc.d
/apcupsd
)
44 -$(call COPY
,$(DESTDIR
)/etc
/rc.d
/halt.old
,/etc
/rc.d
/halt
)
45 -$(call UNINST
,/etc
/rc.d
/halt.old
)