mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-24 11:29:10 +00:00
242bd45fb4
while. This is only the script pieces, the glue for the build comes next. Submitted by: Mike Makonnen <makonnen@pacbell.net> Reviewed by: silence on -current and -hackers Prodded by: rwatson
77 lines
1.3 KiB
Bash
77 lines
1.3 KiB
Bash
#!/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: NETWORKING syslogd mountcritremote
|
|
# BEFORE: SERVERS
|
|
# KEYWORD: FreeBSD NetBSD
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="isdnd"
|
|
rcvar=`set_rcvar isdn`
|
|
pidfile="/var/run/${name}.pid"
|
|
|
|
case `${CMD_OSTYPE}` in
|
|
FreeBSD)
|
|
start_cmd="isdnd_start"
|
|
;;
|
|
NetBSD)
|
|
command="/usr/sbin/${name}"
|
|
required_files="/etc/isdn/${name}.rc"
|
|
;;
|
|
esac
|
|
|
|
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 &
|
|
echo '.'
|
|
fi
|
|
}
|
|
|
|
load_rc_config $name
|
|
run_rc_command "$1"
|