Re: [asterisk-users] Re: modprobe wctdm fails in /etc/rc.local on FC5

2006-08-20 Thread Tzafrir Cohen
On Wed, Aug 16, 2006 at 08:38:49PM -0400, Robert La Ferla wrote:
 I found an init.d script for asterisk BUT not for asterisk/zaptel  
 modules.  I'm still looking for a good solution.  It seems to me that  
 the correct solution would involve /etc/modprobe.d/modpobe.conf.

Have you noticed the sleep between the modprobe of zaptel and the
modprobe of wctdm? This is precicely because eople try to run ztcfg
automatically after module load, and /dev/zap/ctl does not exist yet.

Automatically running ztcfg will not help you. Though I have a nice
little patch to zaptel to avoid that need altogether...
http://bugs.digium.com/view.php?id=7613

-- 
Tzafrir Cohen sip:[EMAIL PROTECTED]
icq#16849755  iax:[EMAIL PROTECTED]
+972-50-7952406  jabber:[EMAIL PROTECTED]
[EMAIL PROTECTED] http://www.xorcom.com
___
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Re: modprobe wctdm fails in /etc/rc.local on FC5

2006-08-17 Thread Tzafrir Cohen
Below is a good example of misusing init.d scripts with the obvious
results of the need for ugly workarounds. Why do you fight against the
design of your system?

See specific comments below,

On Wed, Aug 16, 2006 at 08:20:55AM -0400, Steven wrote:
 rc.local:
 
 touch /var/lock/subsys/local
 
 setpci -v -s 00:1f.1 LATENCY_TIMER=4
 setpci -v -s 02:0e.0 LATENCY_TIMER=4
 setpci -v -s 0b:07.0 LATENCY_TIMER=4
 setpci -v -s 0c:08.0 LATENCY_TIMER=4
 setpci -v -s 10:0d.0 LATENCY_TIMER=0
 setpci -v -s 06:02.0 LATENCY_TIMER=ff
 sleep 5

Why a sleep here? What exactly do you wait for?

sleep is an indication of a bad workaround for a race condition. It is
a bad workaround, as you can never know if you sleep enough.

 
 echo UnLoading wct4xxp
 rmmod -v wct4xxp
 rmmod -v zaptel
 sleep 3

Huh? Why is that? 

BTW: 'genzaptelconf -u' will unload all zaptel modules. If 'modprobe -r'
works on your system: that's even better.

 
 echo Loading wct4xxp
 /sbin/modprobe -v zaptel
 sleep 5
 /sbin/modprobe -v wct4xxp
 sleep 5
 # ztcfg -
 #sleep 5

The 'sleep'-s here are because of the following bugs:

1. running ztcfg automatically on modules load
2. not properly waiting for /dev/zap/ctl to be generated by udev

 
 echo 1  /proc/irq/201/smp_affinity
 echo 1  /proc/irq/217/smp_affinity
 echo 0  /proc/irq/209/smp_affinity
 echo 1  /proc/irq/14/smp_affinity
 
 /usr/sbin/amportal start

Now, that's an init.d script. Most of the code above should be merged
into the zaptel init.d script (which is run before asterisk/amportal).
Then the init system will run amportal later. If actually needed.

-- 
Tzafrir Cohen sip:[EMAIL PROTECTED]
icq#16849755  iax:[EMAIL PROTECTED]
+972-50-7952406  jabber:[EMAIL PROTECTED]
[EMAIL PROTECTED] http://www.xorcom.com
___
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] Re: modprobe wctdm fails in /etc/rc.local on FC5

2006-08-17 Thread Steven
I just reread the post I replied to.

I thought that they were asking for a ref. rc.local.
I didn't notice that it said modprobe.conf.

alias eth0 e1000
alias eth1 e1000
alias scsi_hostadapter megaraid_mbox
alias usb-controller ehci-hcd
alias usb-controller1 uhci-hcd
options torisa base=0xd
install tor2 /sbin/modprobe --ignore-install tor2  /sbin/ztcfg
install torisa /sbin/modprobe --ignore-install torisa  /sbin/ztcfg
install wcusb /sbin/modprobe --ignore-install wcusb  /sbin/ztcfg
install wcfxo /sbin/modprobe --ignore-install wcfxo  /sbin/ztcfg
install wctdm /sbin/modprobe --ignore-install wctdm  /sbin/ztcfg
install wctdm24xxp /sbin/modprobe --ignore-install wctdm24xxp  /sbin/ztcfg
install ztdynamic /sbin/modprobe --ignore-install ztdynamic  /sbin/ztcfg
install ztd-eth /sbin/modprobe --ignore-install ztd-eth  /sbin/ztcfg
install wct1xxp /sbin/modprobe --ignore-install wct1xxp  /sbin/ztcfg
install wct4xxp /sbin/modprobe --ignore-install wct4xxp  /sbin/ztcfg
install wcte11xp /sbin/modprobe --ignore-install wcte11xp  /sbin/ztcfg
install pciradio /sbin/modprobe --ignore-install pciradio  /sbin/ztcfg
install ztd-loc /sbin/modprobe --ignore-install ztd-loc  /sbin/ztcfg
install ztdummy /sbin/modprobe --ignore-install ztdummy  /sbin/ztcfg
alias wcfxs wctdm
alias wct2xxp wct4xxp

-- 
-- 
Steven

http://www.glimasoutheast.org



Steven [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
 rc.local:

 touch /var/lock/subsys/local

 setpci -v -s 00:1f.1 LATENCY_TIMER=4
 setpci -v -s 02:0e.0 LATENCY_TIMER=4
 setpci -v -s 0b:07.0 LATENCY_TIMER=4
 setpci -v -s 0c:08.0 LATENCY_TIMER=4
 setpci -v -s 10:0d.0 LATENCY_TIMER=0
 setpci -v -s 06:02.0 LATENCY_TIMER=ff
 sleep 5

 echo UnLoading wct4xxp
 rmmod -v wct4xxp
 rmmod -v zaptel
 sleep 3

 echo Loading wct4xxp
 /sbin/modprobe -v zaptel
 sleep 5
 /sbin/modprobe -v wct4xxp
 sleep 5
 # ztcfg -
 #sleep 5

 echo 1  /proc/irq/201/smp_affinity
 echo 1  /proc/irq/217/smp_affinity
 echo 0  /proc/irq/209/smp_affinity
 echo 1  /proc/irq/14/smp_affinity

 /usr/sbin/amportal start



 -- 
 -- 
 Steven

 http://www.glimasoutheast.org



 Robert La Ferla [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
 Can someone send me their modprobe.conf file?  I think that may be  the 
 problem.  A zaptel file is created during install in 
 /etc/ modprobe.d but modprobe.conf must need to reference it...


 ___
 --Bandwidth and Colocation provided by Easynews.com --

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users




 ___
 --Bandwidth and Colocation provided by Easynews.com --

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
 



___
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] Re: modprobe wctdm fails in /etc/rc.local on FC5

2006-08-16 Thread Steven
rc.local:

touch /var/lock/subsys/local

setpci -v -s 00:1f.1 LATENCY_TIMER=4
setpci -v -s 02:0e.0 LATENCY_TIMER=4
setpci -v -s 0b:07.0 LATENCY_TIMER=4
setpci -v -s 0c:08.0 LATENCY_TIMER=4
setpci -v -s 10:0d.0 LATENCY_TIMER=0
setpci -v -s 06:02.0 LATENCY_TIMER=ff
sleep 5

echo UnLoading wct4xxp
rmmod -v wct4xxp
rmmod -v zaptel
sleep 3

echo Loading wct4xxp
/sbin/modprobe -v zaptel
sleep 5
/sbin/modprobe -v wct4xxp
sleep 5
# ztcfg -
#sleep 5

echo 1  /proc/irq/201/smp_affinity
echo 1  /proc/irq/217/smp_affinity
echo 0  /proc/irq/209/smp_affinity
echo 1  /proc/irq/14/smp_affinity

/usr/sbin/amportal start



-- 
-- 
Steven

http://www.glimasoutheast.org



Robert La Ferla [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
 Can someone send me their modprobe.conf file?  I think that may be  the 
 problem.  A zaptel file is created during install in /etc/ 
 modprobe.d but modprobe.conf must need to reference it...


 ___
 --Bandwidth and Colocation provided by Easynews.com --

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
 



___
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] Re: modprobe wctdm fails in /etc/rc.local on FC5

2006-08-16 Thread Robert La Ferla
I found an init.d script for asterisk BUT not for asterisk/zaptel  
modules.  I'm still looking for a good solution.  It seems to me that  
the correct solution would involve /etc/modprobe.d/modpobe.conf.



___
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] Re: modprobe wctdm fails in /etc/rc.local on FC5

2006-08-15 Thread Robert La Ferla
Can someone send me their modprobe.conf file?  I think that may be  
the problem.  A zaptel file is created during install in /etc/ 
modprobe.d but modprobe.conf must need to reference it...



___
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users