2012-01-12 15:15:28 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2012-05-14 11:45:56 +00:00
|
|
|
# yppasswdd-pre-setdomain
|
2012-01-12 15:15:28 +00:00
|
|
|
#
|
|
|
|
# description: This is part of former ypserv init script, which is used
|
2012-05-14 11:45:56 +00:00
|
|
|
# to setup proper domainname before starting yppasswdd daemon
|
2012-01-12 15:15:28 +00:00
|
|
|
# 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
|
2012-05-14 11:45:56 +00:00
|
|
|
logger -t yppasswdd $"domain not found"
|
2012-01-12 15:15:28 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|