summaryrefslogtreecommitdiffstats
path: root/etc/rc.d/isdnd
diff options
context:
space:
mode:
authorsheldonh <sheldonh@FreeBSD.org>1999-09-13 15:44:20 +0000
committersheldonh <sheldonh@FreeBSD.org>1999-09-13 15:44:20 +0000
commitd8a93d30ec0f7b9de2d59dab07ac29c6f7f8f663 (patch)
treef61d8b7d858e07792674c281853167482e6806c5 /etc/rc.d/isdnd
parent019fd9cb5fe17ed3ce93a28306ec3009d2a512f7 (diff)
downloadFreeBSD-src-d8a93d30ec0f7b9de2d59dab07ac29c6f7f8f663.zip
FreeBSD-src-d8a93d30ec0f7b9de2d59dab07ac29c6f7f8f663.tar.gz
Apply a consistent style to most of the etc scripts. Particularly, use
case instead of test where appropriate, since case allows case is a sh builtin and (as a side-effect) allows case-insensitivity. Changes discussed on freebsd-hackers. Submitted by: Doug Barton <Doug@gorean.org>
Diffstat (limited to 'etc/rc.d/isdnd')
-rw-r--r--etc/rc.d/isdnd60
1 files changed, 37 insertions, 23 deletions
diff --git a/etc/rc.d/isdnd b/etc/rc.d/isdnd
index 11e140a..1302102 100644
--- a/etc/rc.d/isdnd
+++ b/etc/rc.d/isdnd
@@ -10,39 +10,53 @@
#
#---------------------------------------------------------------------------
-if [ "${isdn_enable}" = "YES" ] ; then
-
+case ${isdn_enable} in
+[Yy][Ee][Ss])
echo -n 'ISDN subsystem setup:'
- # terminal type for fullscreen mode, default to syscons driver
+ # Terminal type for fullscreen mode, default to syscons driver
+ #
isdn_ttype=cons25
- # check for pcvt driver (VT100/VT220 emulator)
- if [ -x /usr/sbin/ispcvt ] ; then
- if /usr/sbin/ispcvt ; then
+ # Check for pcvt driver (VT100/VT220 emulator)
+ #
+ if [ -x /usr/sbin/ispcvt ]; then
+ if /usr/sbin/ispcvt; then
isdn_ttype=pcvt25
fi
fi
-
- if [ "${isdn_flags}" = "NO" ] ; then
- isdn_flags=""
- fi
-
- # start the isdn daemon
- if [ -x /usr/sbin/isdnd ] ; then
+
+ case ${isdn_flags} in
+ [Nn][Oo] | '')
+ isdn_flags=''
+ ;;
+ esac
+
+ # Start the isdn daemon
+ #
+ if [ -x /usr/sbin/isdnd ]; then
echo -n ' isdnd'
- if [ "${isdn_fsdev}" = "NO" ] ; then
- /usr/sbin/isdnd ${isdn_flags}
- else
+ case ${isdn_fsdev} in
+ [Nn][Oo] | '')
+ /usr/sbin/isdnd ${isdn_flags}
+ ;;
+ *)
/usr/sbin/isdnd ${isdn_flags} -f -r ${isdn_fsdev} -t ${isdn_ttype}
- fi
+ ;;
+ esac
fi
- # start isdntrace
- if [ "${isdn_trace}" = "YES" -a -x /usr/sbin/isdntrace ] ; then
- echo -n ' isdntrace'
- nohup /usr/sbin/isdntrace ${isdn_traceflags} >/dev/null 2>&1 &
- fi
+ # Start isdntrace
+ #
+ case ${isdn_trace} in
+ [Yy][Ee][Ss])
+ if [ -x /usr/sbin/isdntrace ]; then
+ echo -n ' isdntrace'
+ nohup /usr/sbin/isdntrace ${isdn_traceflags} >/dev/null 2>&1 &
+ fi
+ ;;
+ esac
echo '.'
-fi
+ ;;
+esac
OpenPOWER on IntegriCloud