summaryrefslogtreecommitdiff
path: root/sysutils/apcupsd/patches/patch-ai
blob: 51748f13678b6cfd0e3ec51e6eb0e3c5383a48fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
$NetBSD: patch-ai,v 1.4 2007/06/15 21:15:39 bouyer Exp $

--- platforms/netbsd/Makefile.in.orig	2007-06-15 22:58:26.000000000 +0200
+++ platforms/netbsd/Makefile.in	2007-06-15 22:59:03.000000000 +0200
@@ -21,47 +21,6 @@
 # a previous version already existed.
 #
 install:
-	@echo "NetBSD distribution installation"
-	$(INSTALL_PROGRAM) -m 744 apcupsd /etc/rc.apcupsd
-	@-today="`date +%Y%m%d%H%M`"; \
-	grep -q '# TAG_APCUPSD' /etc/rc.shutdown; \
-	if [ $$? -eq 0 ]; then \
-		echo "/etc/rc.shutdown already patched"; \
-	else \
-		echo "patching /etc/rc.shutdown"; \
-		rm -f /etc/rc.shutdown.$$today; \
-		cp -p /etc/rc.shutdown /etc/rc.shutdown.$$today; \
-		( echo "# Do not remove the 'TAG_APCUPSD' text, below"; \
-		  echo "if [ -f @PWRFAILDIR@/powerfail ]; then			     # TAG_APCUPSD";\
-		  echo "    powerdown=YES					     # TAG_APCUPSD"; \
-		  echo "    echo ''						     # TAG_APCUPSD"; \
-		  echo "    echo 'Please ensure that the UPS has powered off before' # TAG_APCUPSD"; \
-		  echo "    echo 'rebooting.  Otherwise, the UPS may cut the power'  # TAG_APCUPSD"; \
-		  echo "    echo 'during the reboot.'				     # TAG_APCUPSD"; \
-		  echo "    echo ''						     # TAG_APCUPSD"; \
-		  echo "fi							     # TAG_APCUPSD"; \
-		) >> /etc/rc.shutdown; \
-	fi; \
-	grep -q /etc/rc.apcupsd /etc/rc.local; \
-	if [ $$? -eq 0 ]; then \
-		echo "/etc/rc.local already patched"; \
-	else \
-		rm -f /etc/rc.local.$$today; \
-		cp -p /etc/rc.local /etc/rc.local.$$today; \
-		( echo "# Start the UPS daemon. Do not remove the 'TAG_APCUPSD' text"; \
-		  echo "# if [ -x /etc/rc.apcupsd ]; then     # TAG_APCUPSD"; \
-		  echo "#	  /etc/rc.apcupsd start       # TAG_APCUPSD"; \
-		  echo "# fi				      # TAG_APCUPSD"; \
-		) >> /etc/rc.local; \
-		echo ""; \
-		( echo "While /etc/rc.local has been patched to run apcupsd,";\
-		echo "the commands are currently commented out.  You should"; \
-		echo "examine the @sysconfdir@/apcupsd.conf file to ensure"; \
-		echo "that it is suitable for your site.  Then run"; \
-		echo "/etc/rc.apcupsd manually to ensure sane operation."; \
-		echo "Once you are satisfied, uncomment the appropriate"; \
-		echo "lines in /etc/rc.local" ) | /usr/bin/fmt; \
-	fi
 
 uninstall:
 	@echo "NetBSD distribution uninstall"