~ubuntu-branches/ubuntu/precise/netatalk/precise

« back to all changes in this revision

Viewing changes to distrib/initscripts/rc.atalkd.netbsd.tmpl

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Rittau
  • Date: 2004-01-19 12:43:49 UTC
  • Revision ID: james.westby@ubuntu.com-20040119124349-es563jbp0hk0ae51
Tags: upstream-1.6.4
ImportĀ upstreamĀ versionĀ 1.6.4

Show diffs side-by-side

added added

removed removed

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