summaryrefslogtreecommitdiff
blob: 53b9049fbf71a0085a1b70ddf58cb798400f5215 (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
#!/sbin/runscript

# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2

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

depend() {
	need localmount modules
}

start() {
	local device=${DEV_NAME:-536ep}

	ebegin "Starting Intel 536EP modem"

	if ! modprobe -f Intel536 &>/dev/null ; then
		eend $?
		eerror "Failed to load Intel536 module"
		return 1
	fi

	major=`cat /proc/devices | awk "\\$2==\"$device\" {print \\$1}"`
	[ -e "/dev/$device" ] && rm -f /dev/$device
	mknod -m 0660 /dev/$device c $major 1
	chgrp ${DEV_GROUP:-tty} /dev/$device
	[ -e /dev/modem ] || ln -sf $device /dev/modem
	
	start-stop-daemon --start --quiet --background --make-pidfile --pidfile /var/run/hamregistry.pid --exec /usr/sbin/hamregistry
	eend ${?}
}

stop () {
	ebegin	"Stopping Intel 536EP modem"
	start-stop-daemon --stop --quiet --pidfile /var/run/hamregistry.pid
	eend ${?}
}