Add patch
This commit is contained in:
parent
6271d8dceb
commit
71eb17f1f0
11
at-3.1.10-session.patch
Normal file
11
at-3.1.10-session.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- at-3.1.10/atd.c.old 2007-07-12 11:12:36.000000000 +0200
|
||||
+++ at-3.1.10/atd.c 2007-07-12 11:20:40.000000000 +0200
|
||||
@@ -303,6 +303,8 @@
|
||||
free(newname);
|
||||
return;
|
||||
}
|
||||
+ (void) setsid(); //own session for process
|
||||
+
|
||||
/* Let's see who we mail to. Hopefully, we can read it from
|
||||
* the command file; if not, send it to the owner, or, failing that,
|
||||
* to root.
|
9
at.spec
9
at.spec
@ -6,7 +6,7 @@
|
||||
Summary: Job spooling tools
|
||||
Name: at
|
||||
Version: 3.1.10
|
||||
Release: 14%{?dist}
|
||||
Release: 15%{?dist}
|
||||
License: GPL
|
||||
Group: System Environment/Daemons
|
||||
URL: http://ftp.debian.org/debian/pool/main/a/at
|
||||
@ -26,6 +26,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
|
||||
Patch12: at-3.1.10-session.patch
|
||||
|
||||
BuildRequires: fileutils chkconfig /etc/init.d
|
||||
BuildRequires: flex bison autoconf
|
||||
@ -71,6 +72,7 @@ cp %{SOURCE1} .
|
||||
%patch9 -p1 -b .dont_fork
|
||||
%patch10 -p1 -b .perm
|
||||
%patch11 -p1 -b .opt_V
|
||||
%patch12 -p1 -b .session
|
||||
|
||||
%build
|
||||
# patch10 touches configure.in
|
||||
@ -173,6 +175,11 @@ fi
|
||||
%attr(4755,root,root) %{_bindir}/at
|
||||
|
||||
%changelog
|
||||
* Tue Jul 11 2007 Marcela Maslanova <mmaslano@redhat.com> - 3.1.10-15
|
||||
- rewrite init script
|
||||
- add own session - setsid
|
||||
- Resolves: rhbz#247091
|
||||
|
||||
* Tue Jul 9 2007 Marcela Maslanova <mmaslano@redhat.com> - 3.1.10-14
|
||||
- feature: add configuration file
|
||||
- fix -V option
|
||||
|
31
atd.init
31
atd.init
@ -21,24 +21,27 @@ prog="atd"
|
||||
ATD=/usr/sbin/atd
|
||||
LOCK_FILE=/var/lock/subsys/atd
|
||||
|
||||
prog="atd"
|
||||
|
||||
[ -f /etc/sysconfig/atd ] || exit 6
|
||||
|
||||
start() {
|
||||
# Check if atd is already running
|
||||
echo -n $"Starting $prog: "
|
||||
##daemon /usr/sbin/atd
|
||||
$ATD $OPTIONS && success || failure
|
||||
RETVAL=$?
|
||||
[ "$RETVAL" = 0 ] && touch $LOCK_FILE
|
||||
echo
|
||||
echo -n $"Starting $prog: "
|
||||
$ATD $OPTIONS && success || failure
|
||||
RETVAL=$?
|
||||
[ "$RETVAL" = 0 ] && touch $LOCK_FILE
|
||||
echo
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo -n $"Stopping $prog: "
|
||||
killproc $ATD
|
||||
RETVAL=$?
|
||||
[ "$RETVAL" = 0 ] && rm -f $LOCK_FILE
|
||||
echo
|
||||
if [ -n "`pidfileofproc $ATD`" ] ; then
|
||||
killproc $ATD
|
||||
else
|
||||
failure $"Stopping $prog"
|
||||
fi
|
||||
RETVAL=$?
|
||||
[ "$RETVAL" = 0 ] && rm -f $LOCK_FILE
|
||||
echo
|
||||
}
|
||||
|
||||
|
||||
@ -74,7 +77,7 @@ reload)
|
||||
;;
|
||||
condrestart)
|
||||
if [ -f $LOCK_FILE ]; then
|
||||
if [ "$RETVAL" = 0]; then
|
||||
if [ "$RETVAL" = 0 ]; then
|
||||
stop
|
||||
sleep 3
|
||||
start
|
||||
@ -86,6 +89,6 @@ status)
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 {start|stop|restart|reload|condrestart|status}"
|
||||
RETVAL=1
|
||||
RETVAL=3
|
||||
esac
|
||||
exit $RETVAL
|
||||
|
Loading…
Reference in New Issue
Block a user