FreeBSD Bugzilla – Attachment 69742 Details for
Bug 101958
RCify misc/zaptel and cleanup
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
zaptel-rcify.patch
zaptel-rcify.patch (text/plain), 6.06 KB, created by
amistry
on 2006-08-13 07:10:11 UTC
(
hide
)
Description:
zaptel-rcify.patch
Filename:
MIME Type:
Creator:
amistry
Created:
2006-08-13 07:10:11 UTC
Size:
6.06 KB
patch
obsolete
>diff -ruN zaptel.orig/Makefile zaptel/Makefile >--- zaptel.orig/Makefile Sun Aug 13 00:29:52 2006 >+++ zaptel/Makefile Sun Aug 13 01:34:42 2006 >@@ -20,13 +20,14 @@ > > ONLY_FOR_ARCHS= i386 > >-PKGMESSAGE= ${WRKSRC}/.MESSAGE > MAKE_ENV= KMODDIR=${PREFIX}/lib/zaptel >+SUB_FILES= pkg-message >+USE_RC_SUBR= zaptel > > .include <bsd.port.pre.mk> > > .if ${OSVERSION} < 500000 >-IGNORE= "does not build on FreeBSD \< 5.x" >+IGNORE= does not build on FreeBSD \< 5.x > .endif > > pre-everything:: >@@ -42,15 +43,10 @@ > ${WRKSRC}/ztcfg/ztcfg.c > > pre-su-install: >- @${SED} 's|%%PREFIX%%|${PREFIX}|g' ${PKGDIR}/pkg-message > \ >- ${PKGMESSAGE} >- @${SED} 's|%%PREFIX%%|${PREFIX}|g' ${FILESDIR}/zaptel.sh > \ >- ${WRKDIR}/zaptel.sh.sample > @${MKDIR} ${PREFIX}/lib/zaptel > > post-install: > @${TOUCH} ${PREFIX}/lib/zaptel/linker.hints >- @${INSTALL_SCRIPT} ${WRKDIR}/zaptel.sh.sample ${PREFIX}/etc/rc.d > @${CAT} ${PKGMESSAGE} > > .include <bsd.port.post.mk> >diff -ruN zaptel.orig/files/patch-zaptel_zaptel.c zaptel/files/patch-zaptel_zaptel.c >--- zaptel.orig/files/patch-zaptel_zaptel.c Wed Dec 31 19:00:00 1969 >+++ zaptel/files/patch-zaptel_zaptel.c Fri Aug 11 11:57:02 2006 >@@ -0,0 +1,11 @@ >+--- zaptel/zaptel.c.orig Sun Jun 25 14:21:49 2006 >++++ zaptel/zaptel.c Fri Aug 11 11:56:20 2006 >+@@ -397,7 +397,7 @@ >+ >+ int schluffen(void *q) >+ { >+- int rc = tsleep(q, PZERO | PCATCH, "schluffen", 0); >++ int rc = tsleep(q, PZERO | PCATCH, "schluffen", 10); >+ switch(rc) >+ { >+ case EINTR: >diff -ruN zaptel.orig/files/pkg-message.in zaptel/files/pkg-message.in >--- zaptel.orig/files/pkg-message.in Wed Dec 31 19:00:00 1969 >+++ zaptel/files/pkg-message.in Sun Aug 13 01:09:17 2006 >@@ -0,0 +1,27 @@ >+------------------------------------------------------------------------------- >+IMPORTANT! MAKE SURE TO READ THE FOLLOWING! >+ >+To use the driver set zaptel_enable="YES" in your rc.conf. >+ >+To load the driver run (as root): >+ >+# %%PREFIX%%/etc/rc.d/zaptel start >+ >+To unload it: >+ >+# %%PREFIX%%/etc/rc.d/zaptel stop >+ >+It'll also load the driver automatically when the system is started. >+ >+Report problems to Alexander Timoshenko <gonzo@pbxpress.com>. Please note that >+it is still "work in progress" so that your bug reports are welcome and will >+help to improve quality of the drivers. >+ >+Great thanks to all companies and individuals who made this driver happen, >+including but not limited to, John Todd, Chris Coleman, Alexander Timoshenko, >+PBXpress, Inc, Max Khon, LF.net, Luigi Rizzo and others contributors. >+ >+Thanks and enjoy! >+ >+-Maxim >+------------------------------------------------------------------------------- >diff -ruN zaptel.orig/files/zaptel.in zaptel/files/zaptel.in >--- zaptel.orig/files/zaptel.in Wed Dec 31 19:00:00 1969 >+++ zaptel/files/zaptel.in Sun Aug 13 01:49:33 2006 >@@ -0,0 +1,51 @@ >+#!/bin/sh >+# >+# $FreeBSD$ >+# >+# PROVIDE: zaptel >+# REQUIRE: NETWORKING >+# KEYWORD: shutdown >+# >+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf >+# to enable this service: >+# >+# zaptel_enable (bool): Set to NO by default. >+# Set it to YES to enable zaptel. >+# >+ >+. %%RC_SUBR%% >+ >+kmod_dir=%%PREFIX%%/lib/zaptel >+ >+kmod_load="qozap.ko wcfxs.ko wcfxo.ko wct1xxp.ko wct4xxp.ko wcte11xp.ko" >+name="zaptel" >+rcvar=${name}_enable >+ >+start_cmd="zaptel_start" >+stop_cmd="zaptel_stop" >+ >+zaptel_start() >+{ >+ echo "Starting ${name}." >+ kldload ${kmod_dir}/${name}.ko >+ for kmod in ${kmod_load} >+ do >+ kldload ${kmod_dir}/${kmod} >+ done >+} >+ >+zaptel_stop() >+{ >+ echo "Stopping ${name}." >+ for kmod in ${kmod_load} >+ do >+ kldunload ${kmod} >+ done >+ kldunload ${name}.ko >+} >+load_rc_config $name >+ >+: ${zaptel_enable="NO"} >+ >+run_rc_command "$1" >+ >diff -ruN zaptel.orig/files/zaptel.sh zaptel/files/zaptel.sh >--- zaptel.orig/files/zaptel.sh Sun Aug 13 00:29:46 2006 >+++ zaptel/files/zaptel.sh Wed Dec 31 19:00:00 1969 >@@ -1,36 +0,0 @@ >-#!/bin/sh >- >-PREFIX=%%PREFIX%% >-LIBDIR=${PREFIX}/lib/zaptel >- >-case "$1" in >- start) >- /sbin/kldload ${LIBDIR}/zaptel.ko || exit 1 >- /sbin/kldload ${LIBDIR}/qozap.ko || exit 1 >- /sbin/kldload ${LIBDIR}/wcfxo.ko || exit 1 >- /sbin/kldload ${LIBDIR}/wcfxs.ko || exit 1 >- /sbin/kldload ${LIBDIR}/wct1xxp.ko || exit 1 >- /sbin/kldload ${LIBDIR}/wct4xxp.ko || exit 1 >- /sbin/kldload ${LIBDIR}/wcte11xp.ko || exit 1 >- ${PREFIX}/bin/ztcfg >- echo -n " zaptel" >- ;; >- >- stop) >- /sbin/kldunload qozap.ko || exit 1 >- /sbin/kldunload wcfxs.ko || exit 1 >- /sbin/kldunload wcfxo.ko || exit 1 >- /sbin/kldunload wct1xxp.ko || exit 1 >- /sbin/kldunload wct4xxp.ko || exit 1 >- /sbin/kldunload wcte11xp.ko || exit 1 >- /sbin/kldunload zaptel.ko || exit 1 >- echo -n " zaptel" >- ;; >- >- *) >- echo "" >- echo "Usage: `basename $0` { start | stop }" >- echo "" >- exit 64 >- ;; >-esac >diff -ruN zaptel.orig/pkg-message zaptel/pkg-message >--- zaptel.orig/pkg-message Sun Aug 13 00:29:52 2006 >+++ zaptel/pkg-message Wed Dec 31 19:00:00 1969 >@@ -1,28 +0,0 @@ >-------------------------------------------------------------------------------- >-IMPORTANT! MAKE SURE TO READ THE FOLLOWING! >- >-To use the driver, make a copy of %%PREFIX%%/etc/rc.d/zaptel.sh.sample >-under %%PREFIX%%/etc/rc.d/zaptel.sh. >- >-To load the driver run (as root): >- >-# %%PREFIX%%/etc/rc.d/zaptel.sh start >- >-To unload it: >- >-# %%PREFIX%%/etc/rc.d/zaptel.sh stop >- >-It'll also load the driver automatically when the system is started. >- >-Report problems to Alexander Timoshenko <gonzo@pbxpress.com>. Please note that >-it is still "work in progress" so that your bug reports are welcome and will >-help to improve quality of the drivers. >- >-Great thanks to all companies and individuals who made this driver happen, >-including but not limited to, John Todd, Chris Coleman, Alexander Timoshenko, >-PBXpress, Inc, Max Khon, LF.net, Luigi Rizzo and others contributors. >- >-Thanks and enjoy! >- >--Maxim >-------------------------------------------------------------------------------- >diff -ruN zaptel.orig/pkg-plist zaptel/pkg-plist >--- zaptel.orig/pkg-plist Sun Aug 13 00:29:52 2006 >+++ zaptel/pkg-plist Sun Aug 13 00:52:56 2006 >@@ -3,7 +3,6 @@ > bin/ztmonitor > bin/zttest > bin/zttool >-etc/rc.d/zaptel.sh.sample > include/tonezone.h > include/zaptel.h > lib/libtonezone.a
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 101958
: 69742