summaryrefslogtreecommitdiff
blob: 428e2830f74afe786aa7bd0d49c919aa0b22bff9 (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
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-dialup/isdn4k-utils/files/3.5_p20041024/isdn4linux.init,v 1.2 2004/11/10 21:30:05 mrness Exp $

opts="start stop save reload"

depend() {
	use pcmcia
	after capi
}

start() {
	# set this variable if you want to load drivers
	for DRIVER in ${ISDN_DRIVERS} ; do
		if ! /bin/grep -q "^${DRIVER} " /proc/modules ; then
			ebegin "Loading ISDN driver ${DRIVER}"
			/sbin/modprobe ${DRIVER}
			eend $?
		fi
	done

	ebegin "Loading isdnctrl configuration"

	# This variable is set in /etc/conf.d/isdn4linux
	[ ! -f ${ISDNCTRL_SAVE} ] || isdnctrl readconf ${ISDNCTRL_SAVE} >/dev/null

	eend $?
}

save() {
	ebegin "Saving isdnctrl configuration"

	isdnctrl writeconf ${ISDNCTRL_SAVE} >/dev/null

	eend $?
}

stop() {
	ebegin "Unloading isdnctrl configuration"

	isdnctrl reset force >/dev/null

	eend $?
}