3a5608e845
Resolves: #699826
22 lines
580 B
Bash
22 lines
580 B
Bash
#!/bin/sh
|
|
#
|
|
# ypserv-domain
|
|
#
|
|
# description: This is part of former ypserv init script, which is used
|
|
# to setup proper domainname before starting ypserv daemon
|
|
# itself. If $NISDOMAIN is not defined, it fails.
|
|
#
|
|
|
|
DOMAINNAME=`domainname`
|
|
if [ "$DOMAINNAME" = "(none)" -o "$DOMAINNAME" = "" ]; then
|
|
echo -n $"Setting NIS domain: "
|
|
if [ -n "$NISDOMAIN" ]; then
|
|
domainname $NISDOMAIN
|
|
echo $"'$NISDOMAIN' (environment variable)"
|
|
else # no domainname found
|
|
logger -t ypserv $"domain not found"
|
|
exit 1
|
|
fi
|
|
fi
|
|
|