Blame SOURCES/yppasswdd-pre-setdomain

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