]>
git.saurik.com Git - apple/launchd.git/blob - launchd/src/StartupItems/NIS
4 # Network Information Service
12 # rpc.yppasswdd is run on NIS masters
13 if [ -f "${VARYP}/${NISDOMAIN}/ypservers.db" ]; then
14 NISMASTER
=$(makedbm -U "${VARYP}/${NISDOMAIN}/ypservers" | sed -n '/YP_MASTER_NAME/p' | awk '{print $2}')
15 if [ "$NISMASTER" = "$(hostname)" ]; then
24 # Network Information Service.
27 if [ -f /var
/run
/NIS.StartupItem
-o "${NETWORKUP}" = "-NO-" ]; then exit; fi
28 touch /var
/run
/NIS.StartupItem
30 if [ "${NISDOMAIN:=-NO-}" != "-NO-" ]; then
34 echo "Starting Network Information Service"
36 echo "Setting NIS domainname to ${NISDOMAIN}"
37 domainname
"${NISDOMAIN}"
39 # ypserv is run on NIS servers - machines with an ${VARYP}/${NISDOMAIN} dir
40 if [ -d "${VARYP}/${NISDOMAIN}" ]; then
41 if ! pid
=$(GetPID ypserv); then
48 # ypbind is run on all NIS clients
55 echo "Stopping Network Information Service"
56 killall
-TERM ypbind
> /dev
/null
2>&1
57 killall
-TERM rpc.yppasswdd
> /dev
/null
2>&1
59 if pid
=$(GetPID ypserv); then
66 echo "Restarting Network Information Service"
67 killall
-TERM ypbind
> /dev
/null
2>&1
68 killall
-TERM rpc.yppasswdd
> /dev
/null
2>&1
70 if pid
=$(GetPID ypserv); then