summaryrefslogtreecommitdiffstats
path: root/etc/rc.d/isdnd
blob: b015b6bd9c8af3e9d66c04daf2b5028c27186e69 (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
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/sh
#
# $NetBSD: isdnd,v 1.9 2002/04/10 23:37:13 martin Exp $
# $FreeBSD$
#
# Mostly based on original script (/etc/rc.isdn) written by  Hellmuth Michaelis
#

# PROVIDE: isdnd
# REQUIRE: netif mountcritlocal
# KEYWORD: FreeBSD nojail

. /etc/rc.subr

name="isdnd"
rcvar=`set_rcvar isdn`
pidfile="/var/run/${name}.pid"
start_cmd="isdnd_start"

isdnd_start()
{
	echo -n 'ISDN subsystem setup:'

	# Check for pcvt driver (VT100/VT220 emulator)
	#
	if [ -x /usr/sbin/ispcvt ]; then
		if /usr/sbin/ispcvt; then
			# No vidcontrol if we are using pcvt
			#
			isdn_screenflags=NO
		fi
	fi

	# Start isdnd
	#
	echo -n ' isdnd'
	case ${isdn_fsdev} in
	[Nn][Oo] | '')
		/usr/sbin/isdnd ${isdn_flags}
		;;
	*)
		# Change vidmode of ${isdn_fsdev}
		#
		case ${isdn_screenflags} in
		[Nn][Oo])
			;;
		*)
			/usr/sbin/vidcontrol < ${isdn_fsdev} > ${isdn_fsdev} 2>&1 ${isdn_screenflags}
			;;
		esac

		/usr/sbin/isdnd ${isdn_flags} -f -r ${isdn_fsdev} -t ${isdn_ttype}
		;;
	esac

	# Start isdntrace
	#
	if checkyesno isdn_trace; then
		echo -n ' isdntrace'
		nohup /usr/sbin/isdntrace ${isdn_traceflags} >/dev/null 2>&1 &
	fi
	echo '.'
}

load_rc_config $name
run_rc_command "$1"
OpenPOWER on IntegriCloud