1#!/bin/sh 2# 3# PROVIDE: atalkd 4# REQUIRE: DAEMON 5# 6# AppleTalk daemon. (netatalk :NETATALK_VERSION:) 7# If you use AppleTalk, Make sure not to start atalkd in the background: 8# its data structures must have time to stablize before running the 9# other processes. 10# 11 12. /etc/rc.subr 13 14name="atalkd" 15rcvar=$name 16command=":SBINDIR:/atalkd" 17pidfile="/var/run/${name}.pid" 18register=":BINDIR:/nbprgstr" 19myhostname=`hostname|sed 's/\..*$//'` 20required_files=":ETCDIR:/atalkd.conf $register" 21 22start_cmd="atalkd_start" 23 24atalkd_start() 25{ 26 if [ -x $command ]; then 27 echo 'Starting atalkd.' 28 $command $command_args 29 fi 30 31 if [ -x $register ]; then 32 echo 'Setting AppleTalk info with nbprgstr.' 33 $register -p 4 $myhostname:Workstation 34 $register -p 4 $myhostname:netatalk 35 fi 36} 37 38load_rc_config $name 39run_rc_command "$1" 40 41