blob: f7e91e11222a34be9bdaaf706b118cdf83ad2d90 (
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
|
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/files/zaptel.rc6,v 1.2 2004/07/15 00:16:05 agriffis Exp $
depend() {
need net
}
checkconfig() {
if [ ! -f /etc/zaptel.conf ]; then
echo "Please create /etc/zaptel.conf!"
return 0
fi
return 1
}
create_devices() {
mkdir -p -m 0775 /dev/zap
for i in `seq 1 250`; do
mknod /dev/zap/$i c 196 $i
done
mknod /dev/zap/ctl c 196 0
mknod /dev/zap/timer c 196 253
mknod /dev/zap/channel c 196 254
mknod /dev/zap/pseudo c 196 255
}
start() {
checkconfig || exit 1
if [ ! -d /dev/zap ] && [ "$ZAP_FORCE_CREATE" != "no" ]; then
einfo "Creating zaptel device nodes"
create_devices
fi
ebegin "Starting zaptel"
/sbin/ztcfg
eend $?
}
stop() {
ebegin "Stopping zaptel"
/sbin/ztcfg -s
eend $?
}
# vim:ts=4
|