ypbind.init: More effective syntax for #601296

This commit is contained in:
Karel Klic 2010-11-19 21:39:50 +01:00
parent 9905a4e5d8
commit 67c56513a5
2 changed files with 6 additions and 4 deletions

View File

@ -66,8 +66,7 @@ start() {
if [ -n "$NISDOMAIN" ]; then if [ -n "$NISDOMAIN" ]; then
action $"domain is '$NISDOMAIN' " domainname $NISDOMAIN action $"domain is '$NISDOMAIN' " domainname $NISDOMAIN
else # See if the domain is set in config file else # See if the domain is set in config file
NISDOMAIN=`grep "domain" /etc/yp.conf | grep -v ^# | \ NISDOMAIN=`awk '{ if ($1 == "domain") {print $2; exit} }' /etc/yp.conf`
awk '{print $2}' | head -1`
if [ -n "$NISDOMAIN" ]; then if [ -n "$NISDOMAIN" ]; then
action $"domain is '$NISDOMAIN' " \ action $"domain is '$NISDOMAIN' " \
domainname $NISDOMAIN domainname $NISDOMAIN

View File

@ -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.32 Version: 1.32
Release: 2%{?dist} Release: 3%{?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
@ -79,7 +79,10 @@ fi
%doc README NEWS COPYING %doc README NEWS COPYING
%changelog %changelog
* Fri Nov 19 2010 Karel Klic <kklic@redhat.co,> - 3:1.32-2 * Fri Nov 19 2010 Karel Klic <kklic@redhat.com> - 3:1.32-3
- ypbind.init: More effective syntax for #601296.
* Fri Nov 19 2010 Karel Klic <kklic@redhat.com> - 3:1.32-2
- Modified the chkconfig priorities from 27/73 to 24/76, to move - Modified the chkconfig priorities from 27/73 to 24/76, to move
ypbind before netfs. This is useful for hosts that mount NFS file ypbind before netfs. This is useful for hosts that mount NFS file
systems that reside on a server which is resolvable through NIS. systems that reside on a server which is resolvable through NIS.