Hi, Don't know if this is really right, all I know is that Debian sarge does not have /var/lock/subsys/. I foolishly made this patch against the zaptel 1.2 branch rather than trunk, although I did check that the trunk has the problem. It'll probably apply.... I ran it and it works for me. Regards, Karl <kop@meme.com> Free Software: "You don't pay back, you pay forward." -- Robert A. Heinlein --- zaptel.init.orig 2005-12-12 15:36:34.000000000 -0600 +++ zaptel.init 2005-12-12 17:58:33.855867848 -0600 @@ -30,6 +30,11 @@ [ -f /etc/sysconfig/zaptel ] && . /etc/sysconfig/zaptel fi +LOCKFILE=/var/lock/subsys/zaptel # assume redhat +if [ $system = debian ]; then + LOCKFILE=/var/lock/zaptel +fi + if [ -z "${MODULES}" ]; then # Populate defaults if not present MODULES="tor2 wct4xxp wct1xxp wcte11xp wcfxo wctdm" @@ -99,7 +104,7 @@ fi RETVAL=$? - [ $RETVAL -eq 0 ] && touch /var/lock/subsys/zaptel + [ $RETVAL -eq 0 ] && touch $LOCKFILE ;; stop) # Unload drivers @@ -120,7 +125,7 @@ fi RETVAL=$? - [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/zaptel + [ $RETVAL -eq 0 ] && rm -f $LOCKFILE ;; restart) $0 stop
On Tue, Dec 13, 2005 at 06:26:49AM +0000, Karl O. Pinc wrote:> Hi, > > Don't know if this is really right, all I know is > that Debian sarge does not have /var/lock/subsys/. > > I foolishly made this patch against the zaptel 1.2 > branch rather than trunk, although I did check that > the trunk has the problem. It'll probably apply.... > > I ran it and it works for me.It is not needed anyway for loading the modules on Debian, as modules will be loaded before it by discover and/or hotplug (except the bristuff modules). So for the normal case, it is not used anyway. It is only used if you ever want to rmmod those modules. For that you borrow can use genzaptelconf -u from the latest Sid deb, which also has a nice safety check if asterisk is running. I generally prefer to load the modules in /etc/modules and remove the insane post-install commands from modules.conf/modprobe.conf which are the causes of strange error messages and of the fact that you modprobe zaptel separately. BTW: some modules may provide a span (/proc/zaptel/n , not necessarly /proc/zaptel/1) but not function as a timing device. In which case you'll still need to modprobe ztdummy, right? -- Tzafrir Cohen | tzafrir@jbr.cohens.org.il | VIM is http://tzafrir.org.il | | a Mutt's tzafrir@cohens.org.il | | best ICQ# 16849755 | | friend
Kevin P. Fleming
2005-Dec-13 06:32 UTC
[Asterisk-Users] Patch zaptel.init to support debian
Karl O. Pinc wrote:> I foolishly made this patch against the zaptel 1.2 > branch rather than trunk, although I did check that > the trunk has the problem. It'll probably apply....This script is completely unnecessary on Debian; just add the modules you wish to load into /etc/modules and they will be loaded at boot time.