File: rc.atalk.sysv

package info (click to toggle)
netatalk 1.4b2%2Basun2.1.3-6
  • links: PTS
  • area: main
  • in suites: potato
  • size: 2,288 kB
  • ctags: 2,976
  • sloc: ansic: 35,145; makefile: 1,968; sh: 346
file content (91 lines) | stat: -rwxr-xr-x 1,548 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#! /bin/sh
#
# Start/stop the AppleTalk daemons.
#
# AppleTalk daemons. Make sure not to start atalkd in the background:
# its data structures must have time to stablize before running the
# other processes.
#

#
# kill the named process(es)
#
killproc() {
	pid=`/usr/bin/ps -e |
	     /usr/bin/grep $1 |
	     /usr/bin/sed -e 's/^  *//' -e 's/ .*//'`
	[ "$pid" != "" ] && kill $pid
}

case "$1" in

#
# Start the appletalk server processes.
#

'start')

	echo 'starting appletalk daemons: \c'
	if [ -x :SBINDIR:/atalkd ]; then
		:SBINDIR:/atalkd;		echo ' atalkd\c'
	fi

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

	if [ -x :SBINDIR:/papd ]; then
		:SBINDIR:/papd;			echo ' papd\c'
	fi

	if [ -x :SBINDIR:/afpd ]; then
		:SBINDIR:/afpd;			echo ' afpd\c'
	fi

	if [ -x :SBINDIR:/timelord ]; then
		:SBINDIR:/timelord;		echo ' timelord\c'
	fi

	echo '.'

	;;

#
# Stop the appletalk server processes.
#

'stop')

	echo 'stopping appletalk daemons:\c'

	if [ -x :SBINDIR:/papd ]; then
		killproc papd;			echo ' papd\c'
	fi

	if [ -x :SBINDIR:/afpd ]; then
		killproc afpd;			echo ' afpd\c'
	fi

	if [ -x :SBINDIR:/timelord ]; then
		killproc timelord;		echo ' timelord\c'
	fi

	# kill atalkd last, since without it the plumbing goes away.
	if [ -x :SBINDIR:/atalkd ]; then
		killproc atalkd;		echo ' atalkd\c'
	fi

	echo '.'
	;;

#
# Usage statement.
#

*)
	echo "usage: $0 {start|stop}"
	exit 1
	;;
esac