summaryrefslogtreecommitdiff
path: root/network/havp/patches/fixup_and_install_init_script.diff
blob: 80ea40ba33ce33155a6990447211d5230b6f0423 (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
Fix paths to havp binary, config file, and init script, and make 
sure the init script is installed to the correct directory.

diff -Nur havp-0.92a.orig/etc/init.d/havp havp-0.92a/etc/init.d/havp
--- havp-0.92a.orig/etc/init.d/havp	2006-03-24 11:26:26.000000000 -0600
+++ havp-0.92a/etc/init.d/havp	2011-12-20 10:28:49.449889309 -0600
@@ -9,8 +9,8 @@
 # Any configuration of HAVP is done in havp.config
 # Type havp --help for help and read havp.config you should have received.
 
-HAVP_BIN=/usr/local/sbin/havp
-HAVP_CONFIG=/usr/local/etc/havp/havp.config
+HAVP_BIN=/usr/sbin/havp
+HAVP_CONFIG=/etc/havp/havp.config
 PIDFILE=/var/run/havp/havp.pid
 
 # Return values acc. to LSB for all commands but status:
@@ -54,6 +54,7 @@
 			echo "Error: $HAVP_BIN not found"
 			exit 5
 		fi
+		mkdir -p `dirname $PIDFILE`
 		$HAVP_BIN -c $HAVP_CONFIG
 		exit $?
 		;;
diff -Nur havp-0.92a.orig/havp/Makefile.in havp-0.92a/havp/Makefile.in
--- havp-0.92a.orig/havp/Makefile.in	2007-09-11 13:42:44.000000000 -0500
+++ havp-0.92a/havp/Makefile.in	2011-12-20 10:27:42.992846172 -0600
@@ -29,7 +29,8 @@
 	$(INSTALL) -d -m 755 $(DESTDIR)$(localstatedir)/log/havp
 	$(INSTALL) -d -m 755 $(DESTDIR)$(localstatedir)/tmp/havp
 	$(INSTALL) -d -m 755 $(DESTDIR)$(localstatedir)/run/havp
-	$(INSTALL) -d $(DESTDIR)/etc/init.d
+	$(INSTALL) -d $(DESTDIR)/etc/rc.d
+	$(INSTALL) -m 755 ../etc/init.d/havp $(DESTDIR)/etc/rc.d/rc.havp.new
 	$(INSTALL) -m 644 ../etc/havp/havp.config $(DESTDIR)$(sysconfdir)/havp/havp.config.default
 	@if [ ! -f $(DESTDIR)$(sysconfdir)/havp/havp.config ]; then \
 		echo "$(INSTALL) -m 644 ../etc/havp/havp.config $(DESTDIR)$(sysconfdir)/havp/havp.config"; \