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 @@ -18,5 +18,4 @@ STRIP := strip INSTALL = install BINDIR = /usr/sbin -CONFIGDIR = /etc/sysconfig SCRIPTDIR = /etc/init.d MANDIR = /usr/share/man/man8 @@ -29,11 +29,10 @@ $(PROG): p910nd.c strip: $(PROG) $(STRIP) -s $(PROG) install: $(PROG) $(MANPAGE) - mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(CONFIGDIR) \ + 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)