1
description "NIS server"
2
author "Steve Langasek <steve.langasek@canonical.com>"
4
# Patterned after the statd.conf job in nfs-common.
5
start on (started portmap ON_BOOT=
6
or (started portmap ON_BOOT=y
7
and ((filesystem and static-network-up) or failsafe-boot)))
8
stop on stopping portmap or runlevel [!2345]
16
[ -f /usr/sbin/ypbind ] && [ -f /etc/defaultdomain ] || { stop; exit 0; }
18
[ -f /etc/default/nis ] && . /etc/default/nis
20
[ "$NISSERVER" = false ] && { stop; exit 0; }
23
nname=$(cat /etc/defaultdomain)
24
if [ "$oname" != "$nname" ]; then
25
echo "Setting NIS domainname to: $nname"
31
[ -f /etc/default/nis ] && . /etc/default/nis
32
exec ypserv $YPSERVARGS
36
[ -f /etc/default/nis ] && . /etc/default/nis
37
if [ "$NISSERVER" = slave ] && [ -n "$NISMASTER" ]; then
38
/usr/lib/yp/ypinit -s "$NISMASTER"