Better fix for #601296

This commit is contained in:
Karel Klic 2010-11-19 21:53:47 +01:00
parent d195f1d967
commit 0aeda49ae5
2 changed files with 5 additions and 3 deletions

View File

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

View File

@ -1,7 +1,7 @@
Summary: The NIS daemon which binds NIS clients to an NIS domain
Name: ypbind
Version: 1.31
Release: 4%{?dist}
Release: 5%{?dist}
License: GPLv2
Group: System Environment/Daemons
Source0: ftp://ftp.us.kernel.org/pub/linux/utils/net/NIS/ypbind-mt-%{version}.tar.bz2
@ -85,6 +85,9 @@ fi
%doc README NEWS
%changelog
* Fri Nov 19 2010 Karel Klic <kklic@redhat.com> - 3:1.31-5
- Better fix for #601296
* Tue Jun 8 2010 Karel Klic <kklic@redhat.com> - 3:1.31-4
- ypbind.init: take the first domainname in yp.conf and use
only that (rhbz#601296)