File ypbind-systemd-pre of Package ypbind

#!/bin/sh
#
# ypbind-domain
#
# description: This is part of former ypbind init script, which is used 
#              to setup proper domainname before starting ypbind daemon 
#              itself.

mydomain=`domainname`
if [ "$mydomain" = "(none)" -o "x$mydomain" = "x" ]; then
	test -f /etc/defaultdomain && {
	    read DOMAINNAME < /etc/defaultdomain
	}

 	if [ "x$DOMAINNAME" != 'x' ]; then
 		echo "$DOMAINNAME\n"
 		domainname $DOMAINNAME
 	else
 		echo "\nError: NIS domain not specified.\n"
 		exit 1
 	fi
fi

## If we don't have a /etc/yp.conf file, skip starting of
## ypbind and return with "program not configured"
## if you add the -broadcast Option later, comment this out.
if [ ! -f /etc/yp.conf -a "$YPBIND_BROADCAST" != "yes" ] ; then
# Tell the user this has skipped
  echo -n " . . . . . . . . . . ${attn}/etc/yp.conf not found${norm}"
  exit 1
fi

echo 

openSUSE Build Service is sponsored by