ypserv/yppasswdd-pre-setdomain

22 lines
595 B
Plaintext
Raw Normal View History

2023-03-30 20:29:30 +00:00
#!/bin/sh
#
# yppasswdd-pre-setdomain
#
# description: This is part of former ypserv init script, which is used
# to setup proper domainname before starting yppasswdd 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 yppasswdd $"domain not found"
exit 1
fi
fi