public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in sys-process/dcron/files: dcron-4.5-ldflags.patch dcron-4.5-pidfile.patch dcron.init-4.5
@ 2011-05-16 20:28 Mike Frysinger (vapier)
  0 siblings, 0 replies; only message in thread
From: Mike Frysinger (vapier) @ 2011-05-16 20:28 UTC (permalink / raw
  To: gentoo-commits

vapier      11/05/16 20:28:54

  Added:                dcron-4.5-ldflags.patch dcron-4.5-pidfile.patch
                        dcron.init-4.5
  Log:
  Version bump #366991 by Alec Moskvin.
  
  (Portage version: 2.2.0_alpha32/cvs/Linux x86_64)

Revision  Changes    Path
1.1                  sys-process/dcron/files/dcron-4.5-ldflags.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/dcron/files/dcron-4.5-ldflags.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/dcron/files/dcron-4.5-ldflags.patch?rev=1.1&content-type=text/plain

Index: dcron-4.5-ldflags.patch
===================================================================
From 8a292168e584c50808b80df3577a7d89fa32db26 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Mon, 16 May 2011 16:24:20 -0400
Subject: [PATCH] drop LDFLAGS set, and restore CFLAGS linking

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 Makefile |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 1938e05..8309ad6 100644
--- a/Makefile
+++ b/Makefile
@@ -32,7 +32,6 @@ TABSRCS = crontab.c chuser.c
 TABOBJS = crontab.o chuser.o
 PROTOS = protos.h
 LIBS =
-LDFLAGS =
 DEFS =  -DVERSION='"$(VERSION)"' \
 		-DSCRONTABS='"$(SCRONTABS)"' -DCRONTABS='"$(CRONTABS)"' \
 		-DCRONSTAMPS='"$(CRONSTAMPS)"' -DLOG_IDENT='"$(LOG_IDENT)"' \
@@ -54,10 +53,10 @@ protos.h: $(SRCS) $(TABSRCS)
 	fgrep -h Prototype $(SRCS) $(TABSRCS) > protos.h
 
 crond: $(OBJS)
-	$(CC) $(LDFLAGS) $^ $(LIBS) -o crond
+	$(CC) $(CFLAGS) $(LDFLAGS) $^ $(LIBS) -o crond
 
 crontab: $(TABOBJS)
-	$(CC) $(LDFLAGS) $^ -o crontab
+	$(CC) $(CFLAGS) $(LDFLAGS) $^ -o crontab
 
 %.o: %.c defs.h $(PROTOS)
 	$(CC) $(CFLAGS) $(CPPFLAGS) -c $(DEFS) $< -o $@
-- 
1.7.5.rc3




1.1                  sys-process/dcron/files/dcron-4.5-pidfile.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/dcron/files/dcron-4.5-pidfile.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/dcron/files/dcron-4.5-pidfile.patch?rev=1.1&content-type=text/plain

Index: dcron-4.5-pidfile.patch
===================================================================
From 14b0f33ebf33d3d08427fd4d9fd4bda3cc107bd0 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Tue, 26 Oct 2010 01:42:32 -0400
Subject: [PATCH] crond: write a pid file

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 Makefile |    2 +-
 main.c   |    5 +++++
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index dc5b78f..e278312 100644
--- a/Makefile
+++ b/Makefile
@@ -38,7 +38,7 @@ DEFS =  -DVERSION='"$(VERSION)"' \
 		-DTIMESTAMP_FMT='"$(TIMESTAMP_FMT)"'
 
 # save variables needed for `make install` in config
-all: $(PROTOS) crond crontab ;
+all: crond crontab ;
 	rm -f config
 	echo "PREFIX = $(PREFIX)" >> config
 	echo "SBINDIR = $(SBINDIR)" >> config
diff --git a/main.c b/main.c
index e4a742e..6313213 100644
--- a/main.c
+++ b/main.c
@@ -227,6 +227,11 @@ main(int ac, char **av)
 			exit(1);
 		} else if (pid > 0) {
 			/* parent */
+			FILE *fp;
+			if ((fp = fopen("/var/run/crond.pid", "w")) != NULL) {
+				fprintf(fp, "%d\n", pid);
+				fclose(fp);
+			}
 			exit(0);
 		}
 		/* child continues */
-- 
1.7.3.1




1.1                  sys-process/dcron/files/dcron.init-4.5

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/dcron/files/dcron.init-4.5?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/dcron/files/dcron.init-4.5?rev=1.1&content-type=text/plain

Index: dcron.init-4.5
===================================================================
#!/sbin/runscript
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-process/dcron/files/dcron.init-4.5,v 1.1 2011/05/16 20:28:54 vapier Exp $

depend() {
	use logger clock hostname
	provide cron
}

start() {
	ebegin "Starting ${SVCNAME}"
	/usr/sbin/crond ${DCRON_OPTS}
	eend $?
}

stop() {
	ebegin "Stopping ${SVCNAME}"
	start-stop-daemon --stop --quiet \
		--pidfile /var/run/crond.pid --exec /usr/sbin/crond
	local ret=$?
	rm -f /var/run/crond.pid
	eend ${ret}
}






^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-05-16 20:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-16 20:28 [gentoo-commits] gentoo-x86 commit in sys-process/dcron/files: dcron-4.5-ldflags.patch dcron-4.5-pidfile.patch dcron.init-4.5 Mike Frysinger (vapier)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox