4 include $(topdir
)/autoconf
/targets.mak
6 all-install
: install-alpha
7 all-uninstall
: uninstall-alpha
10 $(call DISTINST
,alpha
)
11 $(call MKDIR
,/sbin
/init.d
)
12 $(call INSTDATA
,744,apcupsd
,/sbin
/init.d
/apcupsd
)
13 $(call MKDIR
,/sbin
/rc2.d
)
14 $(call SYMLINK
,..
/init.d
/apcupsd
,/sbin
/rc2.d
/K56apcupsd
)
15 $(call SYMLINK
,..
/init.d
/apcupsd
,/sbin
/rc2.d
/S56apcupsd
)
16 $(call MKDIR
,/sbin
/rc3.d
)
17 $(call SYMLINK
,..
/init.d
/apcupsd
,/sbin
/rc3.d
/K56apcupsd
)
18 $(call SYMLINK
,..
/init.d
/apcupsd
,/sbin
/rc3.d
/S56apcupsd
)
19 # save old halt script
20 $(call COPY
,/sbin
/rc0
,/sbin
/rc0.old
)
21 # insert apcupsd callout into halt script
22 @echo
" AWK " $(DESTDIR
)/sbin
/rc0
23 $(V
)awk
-f awkhaltprog
$(DESTDIR
)/sbin
/rc0.old
>$(DESTDIR
)/sbin
/rc0
24 $(V
)chmod
744 $(DESTDIR
)/sbin
/rc0
25 @echo
"================================================="
27 @echo
"apcupsd script installation for the Alpha $(DISTVER) complete."
29 @echo
"You should now edit /etc/apcupsd/apcupsd.conf to correspond"
30 @echo
"to your setup then start the apcupsd daemon with:"
32 @echo
"/sbin/init.d/apcupsd start"
34 @echo
"thereafter when you reboot, it will be stopped and started"
35 @echo
"automatically."
37 @echo
"Please check that your halt script in:"
39 @echo
"was properly updated (see installation section of manual)"
41 @echo
"================================================="
44 $(call DISTUNINST
,alpha
)
45 -$(call UNINST
,/sbin
/rc2.d
/K56apcupsd
)
46 -$(call UNINST
,/sbin
/rc2.d
/S56apcupsd
)
47 -$(call UNINST
,/sbin
/rc3.d
/K56apcupsd
)
48 -$(call UNINST
,/sbin
/rc3.d
/S56apcupsd
)
49 -$(call UNINST
,/sbin
/init.d
/apcupsd
)
50 $(call COPY
,/sbin
/rc0
,/sbin
/rc0.old
)
51 $(V
)grep
-v
"###apcupsd###" $(DESTDIR
)/sbin
/rc0.old
>$(DESTDIR
)/sbin
/rc0
52 $(V
)chmod
744 $(DESTDIR
)/sbin
/rc0