Blame SOURCES/yppasswdd-pre-setdomain

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