1999-01-13 08:20:55 +00:00
|
|
|
#!/bin/sh
|
2000-10-08 19:20:36 +00:00
|
|
|
#
|
2002-07-18 05:00:17 +00:00
|
|
|
# $NetBSD: isdnd,v 1.9 2002/04/10 23:37:13 martin Exp $
|
2000-10-08 19:20:36 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
#
|
2002-07-18 05:00:17 +00:00
|
|
|
# Mostly based on original script (/etc/rc.isdn) written by Hellmuth Michaelis
|
1999-01-13 08:20:55 +00:00
|
|
|
#
|
|
|
|
|
2002-07-18 05:00:17 +00:00
|
|
|
# PROVIDE: isdnd
|
2003-04-18 17:55:05 +00:00
|
|
|
# REQUIRE: netif mountcritlocal
|
2004-03-08 12:25:05 +00:00
|
|
|
# KEYWORD: FreeBSD nojail
|
2002-07-18 05:00:17 +00:00
|
|
|
|
|
|
|
. /etc/rc.subr
|
|
|
|
|
|
|
|
name="isdnd"
|
|
|
|
rcvar=`set_rcvar isdn`
|
|
|
|
pidfile="/var/run/${name}.pid"
|
2004-01-17 10:40:45 +00:00
|
|
|
start_cmd="isdnd_start"
|
2002-07-18 05:00:17 +00:00
|
|
|
|
|
|
|
isdnd_start()
|
|
|
|
{
|
1999-03-08 11:28:45 +00:00
|
|
|
echo -n 'ISDN subsystem setup:'
|
|
|
|
|
2001-05-19 08:17:35 +00:00
|
|
|
# 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
|
|
|
|
|
2002-07-18 05:00:17 +00:00
|
|
|
# Start isdnd
|
1999-09-13 15:44:20 +00:00
|
|
|
#
|
2002-07-18 05:00:17 +00:00
|
|
|
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])
|
1999-09-13 15:44:20 +00:00
|
|
|
;;
|
|
|
|
*)
|
2002-07-18 05:00:17 +00:00
|
|
|
/usr/sbin/vidcontrol < ${isdn_fsdev} > ${isdn_fsdev} 2>&1 ${isdn_screenflags}
|
1999-09-13 15:44:20 +00:00
|
|
|
;;
|
|
|
|
esac
|
1999-01-13 08:20:55 +00:00
|
|
|
|
2002-07-18 05:00:17 +00:00
|
|
|
/usr/sbin/isdnd ${isdn_flags} -f -r ${isdn_fsdev} -t ${isdn_ttype}
|
1999-09-13 15:44:20 +00:00
|
|
|
;;
|
|
|
|
esac
|
1999-03-08 11:28:45 +00:00
|
|
|
|
2002-07-18 05:00:17 +00:00
|
|
|
# Start isdntrace
|
|
|
|
#
|
2002-10-12 10:31:31 +00:00
|
|
|
if checkyesno isdn_trace; then
|
2002-07-18 05:00:17 +00:00
|
|
|
echo -n ' isdntrace'
|
|
|
|
nohup /usr/sbin/isdntrace ${isdn_traceflags} >/dev/null 2>&1 &
|
|
|
|
fi
|
2003-07-15 12:39:37 +00:00
|
|
|
echo '.'
|
2002-07-18 05:00:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
load_rc_config $name
|
|
|
|
run_rc_command "$1"
|