rpms/at/devel at-3.1.10-opt_V.patch, NONE, 1.1 at.spec, 1.55, 1.56 atd.init, 1.3, 1.4

Marcela Mašláňová (mmaslano) fedora-extras-commits at redhat.com
Mon Jul 9 13:56:45 UTC 2007


Author: mmaslano

Update of /cvs/pkgs/rpms/at/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22252

Modified Files:
	at.spec atd.init 
Added Files:
	at-3.1.10-opt_V.patch 
Log Message:
Add feature, change init script.


at-3.1.10-opt_V.patch:

--- NEW FILE at-3.1.10-opt_V.patch ---
--- at-3.1.10/configure.in.opt_v	2007-07-04 17:05:33.000000000 +0200
+++ at-3.1.10/configure.in	2007-07-09 09:23:24.000000000 +0200
@@ -5,7 +5,7 @@
 AC_CONFIG_HEADER(config.h)
 AC_PREREQ(2.7)
 
-VERSION="3.1.9"
+VERSION="3.1.10"
 if test "X$CFLAGS" = "X"; then
 CFLAGS="-O2 -g -Wall"
 fi
--- at-3.1.10/at.c.opt_v	2007-07-04 17:05:33.000000000 +0200
+++ at-3.1.10/at.c	2007-07-09 09:34:34.000000000 +0200
@@ -966,9 +966,11 @@
     /* end of options eating
      */
 
-    if (disp_version)
-	fprintf(stderr, "at version " VERSION "\n"
-	   "Bug reports to: rmurray at debian.org (Ryan Murray)\n");
+    if (disp_version) {
+		fprintf(stderr, "at version " VERSION "\n");
+		if (argc == 2)
+			exit(EXIT_SUCCESS);
+	}
 
     /* select our program
      */


Index: at.spec
===================================================================
RCS file: /cvs/pkgs/rpms/at/devel/at.spec,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- at.spec	4 Jul 2007 13:55:26 -0000	1.55
+++ at.spec	9 Jul 2007 13:56:09 -0000	1.56
@@ -6,13 +6,14 @@
 Summary: Job spooling tools
 Name: at
 Version: 3.1.10
-Release: 13%{?dist}
+Release: 14%{?dist}
 License: GPL
 Group: System Environment/Daemons
 URL: http://ftp.debian.org/debian/pool/main/a/at
 Source: http://ftp.debian.org/debian/pool/main/a/at/at_%{major_ver}.tar.gz
 Source1: test.pl
 Source2: atd.init
+Source3: atd.sysconf
 Patch0: at-3.1.7-lockfile.patch
 Patch1: at-3.1.10-makefile.patch
 Patch2: at-3.1.10-man-timespec-path.patch
@@ -24,6 +25,7 @@
 Patch8: at-3.1.10-pam.patch
 Patch9: at-3.1.10-dont_fork.patch
 Patch10: at-3.1.10-perm.patch
+Patch11: at-3.1.10-opt_V.patch
 
 BuildRequires: fileutils chkconfig /etc/init.d
 BuildRequires: flex bison autoconf
@@ -68,6 +70,7 @@
 %patch8 -p1 -b .pam
 %patch9 -p1 -b .dont_fork
 %patch10 -p1 -b .perm
+%patch11 -p1 -b .opt_V
 
 %build
 # patch10 touches configure.in
@@ -124,6 +127,9 @@
 ln -s at.allow.5 \
 	%{buildroot}/%{_mandir}/man5/at.deny.5
 
+mkdir -p %{buildroot}/etc/sysconfig
+install -m 755 %{SOURCE3} %{buildroot}/etc/sysconfig/atd
+
 # remove unpackaged files from the buildroot
 rm -r  %{buildroot}%{_prefix}/doc
 
@@ -134,6 +140,7 @@
 touch %{_localstatedir}/spool/at/.SEQ
 chmod 600 %{_localstatedir}/spool/at/.SEQ
 chown daemon:daemon %{_localstatedir}/spool/at/.SEQ
+# must be in chkconfig on
 /sbin/chkconfig --add atd
 
 %preun
@@ -152,6 +159,7 @@
 %doc docs/*
 %config(noreplace) %{_sysconfdir}/at.deny
 %attr(0700,root,root)		%{_sysconfdir}/rc.d/init.d/atd
+%attr(0700,root,root)		%{_sysconfdir}/sysconfig/atd
 %attr(0700,daemon,daemon)	%dir %{_localstatedir}/spool/at
 %attr(0600,daemon,daemon)	%verify(not md5 size mtime) %ghost %{_localstatedir}/spool/at/.SEQ
 %attr(0700,daemon,daemon)	%dir %{_localstatedir}/spool/at/spool
@@ -165,6 +173,11 @@
 %attr(4755,root,root)	%{_bindir}/at
 
 %changelog
+* Tue Jul  9 2007 Marcela Maslanova <mmaslano at redhat.com> - 3.1.10-14
+- feature: add configuration file
+- fix -V option
+- fix init script
+
 * Tue Jul  3 2007 Marcela Maslanova <mmaslano at redhat.com> - 3.1.10-13
 - Resolves: rhbz#243064
 


Index: atd.init
===================================================================
RCS file: /cvs/pkgs/rpms/at/devel/atd.init,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- atd.init	9 Sep 2004 03:14:23 -0000	1.3
+++ atd.init	9 Jul 2007 13:56:09 -0000	1.4
@@ -13,35 +13,32 @@
 # Source function library.
 . /etc/init.d/functions
 
-test -x /usr/sbin/atd || exit 0
+# pull in sysconfig settings
+[ -f /etc/sysconfig/atd ] && . /etc/sysconfig/atd
 
 RETVAL=0
-
-#
-#	See how we were called.
-#
+prog="atd"
+ATD=/usr/sbin/atd
+LOCK_FILE=/var/lock/subsys/atd
 
 prog="atd"
 
 start() {
 	# Check if atd is already running
-	if [ ! -f /var/lock/subsys/atd ]; then
 	    echo -n $"Starting $prog: "
-	    daemon /usr/sbin/atd
+	    ##daemon /usr/sbin/atd
+		$ATD $OPTIONS && success || failure
 	    RETVAL=$?
-	    [ $RETVAL -eq 0 ] && touch /var/lock/subsys/atd
+	    [ "$RETVAL" = 0 ] && touch $LOCK_FILE
 	    echo
-	fi
-	return $RETVAL
 }
 
 stop() {
 	echo -n $"Stopping $prog: "
-	killproc /usr/sbin/atd
+	killproc $ATD 
 	RETVAL=$?
-	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/atd
+	[ "$RETVAL" = 0 ] && rm -f $LOCK_FILE
 	echo
-        return $RETVAL
 }
 
 
@@ -51,13 +48,16 @@
 }	
 
 reload() {
-	restart
+	echo -n $"Reloading $prog: "
+	if [ -n "`pidfileofproc $ATD`" ]; then
+		killproc $ATD -HUP
+	else
+		failure $"Reloading $prog"
+	fi
+	RETVAL=$?
+	echo
 }	
 
-status_at() {
- 	status /usr/sbin/atd
-}
-
 case "$1" in
 start)
 	start
@@ -65,21 +65,27 @@
 stop)
 	stop
 	;;
-reload|restart)
-	restart
+restart)
+	stop
+	start
+	;;
+reload)
+	reload
 	;;
 condrestart)
-	if [ -f /var/lock/subsys/atd ]; then
-	    restart
+	if [ -f  $LOCK_FILE ]; then
+		if [ "$RETVAL" = 0]; then
+			stop
+			sleep 3
+			start
+		fi
 	fi
 	;;
 status)
-	status_at
+	status $ATD
 	;;
 *)
-	echo $"Usage: $0 {start|stop|restart|condrestart|status}"
-	exit 1
+	echo $"Usage: $0 {start|stop|restart|reload|condrestart|status}"
+	RETVAL=1
 esac
-
-exit $?
 exit $RETVAL




More information about the scm-commits mailing list