aboutsummaryrefslogtreecommitdiffstats
path: root/testing/p910nd/fix-paths.patch
blob: d0d10960c1da0f4b8d85187ee46a31983122a27e (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
diff -u a/Makefile b/Makefile
--- a/Makefile	2014-06-01 13:58:41.867584813 +0400
+++ b/Makefile	2014-06-01 14:20:47.460700951 +0400
@@ -5,14 +5,11 @@
 DEFINES += -DUSE_LIBWRAP
 endif
 
-# If you don't have it in /var/log/subsys, uncomment and define
-#CFLAGS += -DLOCKFILE_DIR=\"/var/log\"
+# If you don't have it in /var/lock/subsys, uncomment and define
+CFLAGS += -DLOCKFILE_DIR=\"/var/lock\"
 
-# GNU target string
-CROSS = 
-
-CC = $(CROSS)gcc
-STRIP = $(CROSS)strip
+CC := gcc
+STRIP := strip
 
 CFLAGS += -O2  -Wall

diff --git a/p910nd.c b/p910nd.c
index 2fa4454..a58c1f0 100644
--- a/p910nd.c
+++ b/p910nd.c
@@ -133,11 +133,11 @@ extern int hosts_ctl(char *daemon, char *client_name, char *client_addr, char *c
 #endif
 
 #define		BASEPORT	9100
-#define		PIDFILE		"/var/run/p910%cd.pid"
+#define		PIDFILE		"/run/p910nd/p910nd.%c.pid"
 #ifdef		LOCKFILE_DIR
 #define		LOCKFILE	LOCKFILE_DIR "/p910%cd"
 #else
-#define		LOCKFILE	"/var/lock/subsys/p910%cd"
+#define		LOCKFILE	"/run/lock/p910nd"
 #endif
 #ifndef		PRINTERFILE
 #define         PRINTERFILE     "/dev/lp%c"
diff --git a/Makefile b/Makefile
index 53db51f..6012199 100644
--- a/Makefile
+++ b/Makefile
@@ -14,12 +14,10 @@ STRIP := strip
 CFLAGS += -O2  -Wall
 
 PROG = p910nd
-CONFIG = p910nd.conf
 INITSCRIPT = p910nd.init
 MANPAGE = p910nd.8
 INSTALL = install
 BINDIR = /usr/sbin
-CONFIGDIR = /etc/sysconfig
 SCRIPTDIR = /etc/init.d
 MANDIR = /usr/share/man/man8
 
@@ -29,11 +27,10 @@ $(PROG):	p910nd.c
 strip: $(PROG)
 	$(STRIP) -s $(PROG)
 
-install: $(PROG) $(CONFIG) $(INITSCRIPT) $(MANPAGE)
-	mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(CONFIGDIR) \
+install: $(PROG) $(INITSCRIPT) $(MANPAGE)
+	mkdir -p $(DESTDIR)$(BINDIR) \
 		$(DESTDIR)$(SCRIPTDIR) $(DESTDIR)$(MANDIR)
 	$(INSTALL) $(PROG) $(DESTDIR)$(BINDIR)
-	$(INSTALL) -m 644 $(CONFIG) $(DESTDIR)$(CONFIGDIR)/$(PROG)
 	$(INSTALL) $(INITSCRIPT) $(DESTDIR)$(SCRIPTDIR)/$(PROG)
 	$(INSTALL) -m 644 $(MANPAGE) $(DESTDIR)$(MANDIR)