aboutsummaryrefslogtreecommitdiffstats
path: root/misc/zaptel
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2008-08-16 02:48:56 +0800
committersobomax <sobomax@FreeBSD.org>2008-08-16 02:48:56 +0800
commit91ef2abe183590a019875ad1e5645d8a40fe27f3 (patch)
tree3c004ed869a5fc6cd1b10854be32811d14ff2c28 /misc/zaptel
parent1b7b28572bf45fb905512c3fd7a3bb3fb0f9c8ac (diff)
downloadfreebsd-ports-gnome-91ef2abe183590a019875ad1e5645d8a40fe27f3.tar.gz
freebsd-ports-gnome-91ef2abe183590a019875ad1e5645d8a40fe27f3.tar.zst
freebsd-ports-gnome-91ef2abe183590a019875ad1e5645d8a40fe27f3.zip
Allow list of modules to be loaded at startup to be configured via
zaptel_kmod_load rc.conf variable. PR: ports/115739 Submitted by: Adam Jacob Muller <adam@adam.gs>
Diffstat (limited to 'misc/zaptel')
-rw-r--r--misc/zaptel/Makefile2
-rw-r--r--misc/zaptel/files/zaptel.in21
2 files changed, 15 insertions, 8 deletions
diff --git a/misc/zaptel/Makefile b/misc/zaptel/Makefile
index 287fe2e53d05..055d1c64d8ee 100644
--- a/misc/zaptel/Makefile
+++ b/misc/zaptel/Makefile
@@ -7,7 +7,7 @@
PORTNAME= zaptel
PORTVERSION= 1.4.6
-PORTREVISION= 6
+PORTREVISION= 7
CATEGORIES= misc kld
MASTER_SITES= http://www.pbxpress.com/~gonzo/
DISTNAME= ${PORTNAME}-bsd-${PORTVERSION}
diff --git a/misc/zaptel/files/zaptel.in b/misc/zaptel/files/zaptel.in
index 88f072c4ec26..18ba91228de8 100644
--- a/misc/zaptel/files/zaptel.in
+++ b/misc/zaptel/files/zaptel.in
@@ -18,18 +18,28 @@
kmod_dir=%%PREFIX%%/lib/zaptel
-kmod_load="zaptel.ko qozap.ko tau32pci.ko wcfxo.ko wcfxs.ko wct1xxp.ko wct4xxp.ko wcte11xp.ko wcte12xp.ko"
-kmod_unload="wcte12xp.ko wcte11xp.ko wct4xxp.ko wct1xxp.ko wcfxs.ko wcfxo.ko tau32pci.ko qozap.ko zaptel.ko"
name="zaptel"
rcvar=${name}_enable
start_cmd="zaptel_start"
stop_cmd="zaptel_stop"
+load_rc_config $name
+
+: ${zaptel_enable="NO"}
+
+: ${zaptel_kmod_load="zaptel.ko qozap.ko tau32pci.ko wcfxo.ko wcfxs.ko wct1xxp.ko wct4xxp.ko wcte11xp.ko wcte12xp.ko"}
+# Reverse list
+zaptel_kmod_unload=""
+for kmod in ${zaptel_kmod_load}
+do
+ zaptel_kmod_unload="${kmod} ${zaptel_kmod_unload}"
+done
+
zaptel_start()
{
echo -n " ${name}"
- for kmod in ${kmod_load}
+ for kmod in ${zaptel_kmod_load}
do
if [ -e ${kmod_dir}/${kmod} ]
then
@@ -42,7 +52,7 @@ zaptel_start()
zaptel_stop()
{
echo -n " ${name}"
- for kmod in ${kmod_unload}
+ for kmod in ${zaptel_kmod_unload}
do
if [ -e ${kmod_dir}/${kmod} ]
then
@@ -50,8 +60,5 @@ zaptel_stop()
fi
done
}
-load_rc_config $name
-
-: ${zaptel_enable="NO"}
run_rc_command "$1"