summaryrefslogtreecommitdiff
blob: 60e4b8bd3f7d95c754b3a9f5c284452fcbf20058 (plain)
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
#!/sbin/runscript

#NB: Config is in /etc/conf.d/psion

depend() {
	use logger
}

start() {
    ebegin "Starting Psion Services"
    if test "$START_NCPD" = "yes" ; then
	ebegin "	ncpd"
	start-stop-daemon --start --quiet --exec /usr/sbin/ncpd \
			-- ${NCPD_ARGS} 1>&2
	eend
	if [ "$?" -eq 0 ]
	then
	    if test "$START_PLPNFSD" = "yes" ; then
		ebegin "	plpnfsd"
		start-stop-daemon --start --quiet --exec /usr/sbin/plpnfsd \
			-- ${PLPNFSD_ARGS} 1>&2
		eend
	    fi
	    if test "$START_PLPPRINTD" = "yes" ; then
		ebegin "	plpprintd"
		start-stop-daemon --start --quiet --exec /usr/sbin/plpprintd \
			-- ${PLPPRINTD_ARGS} 1>&2
		eend
	    fi
	fi
    fi
    eend $?
}

stop() {
    ebegin "Stopping Psion Services"
    if test "$START_PLPPRINTD" = "yes" ; then
	ebegin "	plpprintd"
	start-stop-daemon --start --quiet --exec /usr/sbin/plpprintd
	eend
    fi
    if test "$START_PLPNFSD" = "yes" ; then
	ebegin "	plpnfsd"
	echo stop > /mnt/psion/proc/exit
	eend
    fi
    if test "$START_NCPD" = "yes" ; then
	ebegin "	ncpd"
	start-stop-daemon --stop --quiet --exec /usr/sbin/ncpd
	eend
    fi
    eend $?
}