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
|
Summary: Job spooling tools
|
||||||
Name: at
|
Name: at
|
||||||
Version: 3.1.10
|
Version: 3.1.10
|
||||||
Release: 14%{?dist}
|
Release: 15%{?dist}
|
||||||
License: GPL
|
License: GPL
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
URL: http://ftp.debian.org/debian/pool/main/a/at
|
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
|
Patch9: at-3.1.10-dont_fork.patch
|
||||||
Patch10: at-3.1.10-perm.patch
|
Patch10: at-3.1.10-perm.patch
|
||||||
Patch11: at-3.1.10-opt_V.patch
|
Patch11: at-3.1.10-opt_V.patch
|
||||||
|
Patch12: at-3.1.10-session.patch
|
||||||
|
|
||||||
BuildRequires: fileutils chkconfig /etc/init.d
|
BuildRequires: fileutils chkconfig /etc/init.d
|
||||||
BuildRequires: flex bison autoconf
|
BuildRequires: flex bison autoconf
|
||||||
@ -71,6 +72,7 @@ cp %{SOURCE1} .
|
|||||||
%patch9 -p1 -b .dont_fork
|
%patch9 -p1 -b .dont_fork
|
||||||
%patch10 -p1 -b .perm
|
%patch10 -p1 -b .perm
|
||||||
%patch11 -p1 -b .opt_V
|
%patch11 -p1 -b .opt_V
|
||||||
|
%patch12 -p1 -b .session
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# patch10 touches configure.in
|
# patch10 touches configure.in
|
||||||
@ -173,6 +175,11 @@ fi
|
|||||||
%attr(4755,root,root) %{_bindir}/at
|
%attr(4755,root,root) %{_bindir}/at
|
||||||
|
|
||||||
%changelog
|
%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
|
* Tue Jul 9 2007 Marcela Maslanova <mmaslano@redhat.com> - 3.1.10-14
|
||||||
- feature: add configuration file
|
- feature: add configuration file
|
||||||
- fix -V option
|
- fix -V option
|
||||||
|
31
atd.init
31
atd.init
@ -21,24 +21,27 @@ prog="atd"
|
|||||||
ATD=/usr/sbin/atd
|
ATD=/usr/sbin/atd
|
||||||
LOCK_FILE=/var/lock/subsys/atd
|
LOCK_FILE=/var/lock/subsys/atd
|
||||||
|
|
||||||
prog="atd"
|
[ -f /etc/sysconfig/atd ] || exit 6
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
# Check if atd is already running
|
# Check if atd is already running
|
||||||
echo -n $"Starting $prog: "
|
echo -n $"Starting $prog: "
|
||||||
##daemon /usr/sbin/atd
|
$ATD $OPTIONS && success || failure
|
||||||
$ATD $OPTIONS && success || failure
|
RETVAL=$?
|
||||||
RETVAL=$?
|
[ "$RETVAL" = 0 ] && touch $LOCK_FILE
|
||||||
[ "$RETVAL" = 0 ] && touch $LOCK_FILE
|
echo
|
||||||
echo
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
echo -n $"Stopping $prog: "
|
echo -n $"Stopping $prog: "
|
||||||
killproc $ATD
|
if [ -n "`pidfileofproc $ATD`" ] ; then
|
||||||
RETVAL=$?
|
killproc $ATD
|
||||||
[ "$RETVAL" = 0 ] && rm -f $LOCK_FILE
|
else
|
||||||
echo
|
failure $"Stopping $prog"
|
||||||
|
fi
|
||||||
|
RETVAL=$?
|
||||||
|
[ "$RETVAL" = 0 ] && rm -f $LOCK_FILE
|
||||||
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -74,7 +77,7 @@ reload)
|
|||||||
;;
|
;;
|
||||||
condrestart)
|
condrestart)
|
||||||
if [ -f $LOCK_FILE ]; then
|
if [ -f $LOCK_FILE ]; then
|
||||||
if [ "$RETVAL" = 0]; then
|
if [ "$RETVAL" = 0 ]; then
|
||||||
stop
|
stop
|
||||||
sleep 3
|
sleep 3
|
||||||
start
|
start
|
||||||
@ -86,6 +89,6 @@ status)
|
|||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo $"Usage: $0 {start|stop|restart|reload|condrestart|status}"
|
echo $"Usage: $0 {start|stop|restart|reload|condrestart|status}"
|
||||||
RETVAL=1
|
RETVAL=3
|
||||||
esac
|
esac
|
||||||
exit $RETVAL
|
exit $RETVAL
|
||||||
|
Loading…
Reference in New Issue
Block a user