Fixed ypbind-post-waitbind to stop the service when binding is not success
This commit is contained in:
parent
4e0810ffff
commit
fe120cda2f
@ -16,12 +16,14 @@ logger -t ypbind $"Binding NIS service"
|
|||||||
|
|
||||||
timeout=$NISTIMEOUT
|
timeout=$NISTIMEOUT
|
||||||
firsttime=1
|
firsttime=1
|
||||||
|
rpcbound=0
|
||||||
SECONDS=0
|
SECONDS=0
|
||||||
retval=0
|
retval=0
|
||||||
while [ $SECONDS -lt $timeout ] || [ $firsttime -eq 1 ] ; do
|
while [ $SECONDS -lt $timeout ] || [ $firsttime -eq 1 ] ; do
|
||||||
|
firsttime=0
|
||||||
if /usr/sbin/rpcinfo -p | LC_ALL=C fgrep -q ypbind
|
if /usr/sbin/rpcinfo -p | LC_ALL=C fgrep -q ypbind
|
||||||
then
|
then
|
||||||
firsttime=0
|
rpcbound=1
|
||||||
/usr/bin/ypwhich > /dev/null 2>&1
|
/usr/bin/ypwhich > /dev/null 2>&1
|
||||||
retval=$?
|
retval=$?
|
||||||
if [ $retval -eq 0 ]; then
|
if [ $retval -eq 0 ]; then
|
||||||
@ -34,10 +36,20 @@ done
|
|||||||
logger -t ypbind "Binding took $SECONDS seconds"
|
logger -t ypbind "Binding took $SECONDS seconds"
|
||||||
|
|
||||||
if [ $retval -eq 0 ]; then
|
if [ $retval -eq 0 ]; then
|
||||||
logger -t ypbind \
|
if [ $rpcbound -eq 0 ]; then
|
||||||
"NIS domain: `domainname`, NIS server: `ypwhich 2> /dev/null`"
|
logger -t ypbind \
|
||||||
|
"NIS domain: `domainname`, ypbind not registered with rpcbind."
|
||||||
|
else
|
||||||
|
logger -t ypbind \
|
||||||
|
"NIS domain: `domainname`, NIS server: `ypwhich 2> /dev/null`"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
logger -t ypbind \
|
logger -t ypbind \
|
||||||
"NIS server for domain `domainname` is not responding."
|
"NIS server for domain `domainname` is not responding."
|
||||||
|
logger -t ypbind \
|
||||||
|
"Killing ypbind with PID $MAINPID."
|
||||||
|
kill SIGTERM $MAINPID
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
exit $retval
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
Summary: The NIS daemon which binds NIS clients to an NIS domain
|
Summary: The NIS daemon which binds NIS clients to an NIS domain
|
||||||
Name: ypbind
|
Name: ypbind
|
||||||
Version: 1.33
|
Version: 1.33
|
||||||
Release: 8%{?dist}
|
Release: 9%{?dist}
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
Source0: ftp://ftp.us.kernel.org/pub/linux/utils/net/NIS/ypbind-mt-%{version}.tar.bz2
|
Source0: ftp://ftp.us.kernel.org/pub/linux/utils/net/NIS/ypbind-mt-%{version}.tar.bz2
|
||||||
@ -117,6 +117,9 @@ fi
|
|||||||
%doc README NEWS COPYING
|
%doc README NEWS COPYING
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Nov 16 2011 Honza Horak <hhorak@redhat.com> - 3:1.33-9
|
||||||
|
- Fixed ypbind-post-waitbind to stop the service when binding is not success
|
||||||
|
|
||||||
* Tue Nov 15 2011 Honza Horak <hhorak@redhat.com> - 3:1.33-8
|
* Tue Nov 15 2011 Honza Horak <hhorak@redhat.com> - 3:1.33-8
|
||||||
- Fixed ypbind-post-waitbind to handle long rpcinfo requests
|
- Fixed ypbind-post-waitbind to handle long rpcinfo requests
|
||||||
Resolves: #624688
|
Resolves: #624688
|
||||||
|
Loading…
Reference in New Issue
Block a user