#!/bin/sh
#
# AppleTalk daemons. Make sure not to start atalkd in the background:
# its data structures must have time to stablize before running the
# other processes.
#

#
# SUNOS: UNCOMMENT THESE LINES TO LOAD THE KERNEL MODULE.  Note that
# modunload-ing netatalk may cause your machine to panic or hang.
#
##echo -n 'loading netatalk: '
##if [ -f /etc/netatalk/netatalk.o ]; then
##	/usr/etc/modload -sym /etc/netatalk/netatalk.o;
##fi

echo -n 'starting appletalk daemons:'
if [ -x /usr/local/sbin/atalkd ]; then
	/usr/local/sbin/atalkd;		echo -n ' atalkd'
fi

if [ -x /usr/local/bin/nbprgstr ]; then
	/usr/local/bin/nbprgstr -p 4 `hostname|sed 's/\..*$//'`:Workstation
	/usr/local/bin/nbprgstr -p 4 `hostname|sed 's/\..*$//'`:netatalk
					echo -n ' nbprgstr'
fi

if [ -x /usr/local/sbin/papd ]; then
	/usr/local/sbin/papd;		echo -n ' papd'
fi

if [ -x /usr/local/sbin/cnid_metad ]; then
	/usr/local/sbin/cnid_metad;		echo -n ' cnid_metad'
fi

if [ -x /usr/local/sbin/afpd ]; then
	/usr/local/sbin/afpd;		echo -n ' afpd'
fi

if [ -x /usr/local/sbin/timelord ]; then
	/usr/local/sbin/timelord;		echo -n ' timelord'
fi

					echo '.'
