diff --git a/ypbind.init b/ypbind.init index e237f32..143e70b 100755 --- a/ypbind.init +++ b/ypbind.init @@ -17,7 +17,17 @@ OTHER_YPBIND_OPTS="" # Source function library. . /etc/init.d/functions +. /etc/sysconfig/network + start() { + DOMAINNAME=`domainname` + if [ "$DOMAINNAME" = "(none)" -o "$DOMAINNAME" = "" ]; then + if [ -n "$NISDOMAIN" ]; then + action "Setting NIS domain name $NISDOMAIN: " domainname $NISDOMAIN + else + exit 1 + fi + fi echo -n "Binding to the NIS domain... " daemon ypbind $OTHER_YPBIND_OPTS echo diff --git a/ypbind.spec b/ypbind.spec index 3a3fa5d..275a461 100644 --- a/ypbind.spec +++ b/ypbind.spec @@ -1,7 +1,7 @@ Summary: The NIS daemon which binds NIS clients to an NIS domain. Name: ypbind Version: 1.6 -Release: 11 +Release: 12 Copyright: GPL Group: System Environment/Daemons Source0: ftp://ftp.us.kernel.org/pub/linux/NIS/ypbind-mt-%{PACKAGE_VERSION}.tar.gz @@ -80,6 +80,9 @@ exit 0 %doc README NEWS %changelog +* Wed Nov 29 2000 Bill Nottingham +- set NIS domain name if it's not already set + * Sun Aug 20 2000 Florian La Roche - fix condrestart #16615 - security fix for syslog() call