[Asterisk-Users] ztdummy on gentoo 2005.1 [SOLVED]

Miguel mmiranda at 123.com.sv
Thu Feb 9 09:39:43 MST 2006


Tzafrir Cohen wrote:

>>Makefile:204: target `ztdummy.o' given more than once in the same rule.
>>    
>>
>
>Something is bad. Did you edit Makefile?
>  
>
>  
>
Yes. I delete all the modules, leaving the lines like this

before:

MODULES:=zaptel tor2 torisa wcusb wcfxo wctdm wctdm24xxp \
         ztdynamic ztd-eth wct1xxp wct4xxp wcte11xp pciradio \
         ztd-loc # ztdummy


after:

MODULES:= ztdummy

but some lines below you find this:

# build ztdummy by default for 2.6 kernels
ifeq (${BUILDVER},linux26)
MODULES+=ztdummy
endif

So, the ztdummy is always compiled with 2.6 kernels, i changed the line 
commenting out all modules :


MODULES:=#zaptel tor2 torisa wcusb wcfxo wctdm wctdm24xxp \
         ztdynamic ztd-eth wct1xxp wct4xxp wcte11xp pciradio \
         ztd-loc # ztdummy
#MODULES+=wcfxsusb
# build ztdummy by default for 2.6 kernels
ifeq (${BUILDVER},linux26)
MODULES+=ztdummy
endif


and edited the /etc/modules.d/zaptel file leaving only:

voip zaptel-1.2.3 # cat /etc/modules.d/zaptel
post-install ztdummy /sbin/ztcfg


now when i load the module without problems:

voip # lsmod
Module                  Size  Used by
voip # modprobe ztdummy
voip # lsmod
Module                  Size  Used by
ztdummy                 2468  -
zaptel                222244  -


I notice that the zaptel module is loaded too, is this normal?
---

    Miguel


>Something is wrong. Not sure exactly what.
>
>Now the overly-complicated "install" target's script springs into action
>and manages to install the .o file into the modules dir. Funny, don't
>you think?
>
>  
>
>> CC      /usr/local/src/zaptel-1.2.3/ztdummy.mod.o
>> LD [M]  /usr/local/src/zaptel-1.2.3/ztdummy.ko
>>make[1]: Leaving directory `/usr/src/linux-2.6.12-gentoo-r10'
>>cc -shared -Wl,-soname,libtonezone.so.1.0 -lm -o libtonezone.so 
>>zonedata.lo tonezone.lo
>>install -m 444 udev/zaptel.rules-combined /etc/udev/rules.d/zaptel.rules
>>install -D -m 755 ztcfg /sbin/ztcfg
>>if [ -f sethdlc-new ]; then \
>>   install -D -m 755 sethdlc-new /sbin/sethdlc; \
>>elif [ -f sethdlc ]; then \
>>   install -D -m 755 sethdlc /sbin/sethdlc ; \
>>fi
>>if [ -f zttool ]; then install -D -m 755 zttool /sbin/zttool; fi
>>if [ -f zaptel.ko ]; then \
>>   for x in ztdummy.ko ztdummy.ko; do \
>>       rm -f /lib/modules/2.6.12-gentoo-r10/extra/$x ; \
>>   done; \
>>   make -C /lib/modules/2.6.12-gentoo-r10/build 
>>SUBDIRS=/usr/local/src/zaptel-1.2.3 INSTALL_MOD_PATH= 
>>INSTALL_MOD_DIR=misc modules_install; \
>>   if ! [ -f wcfxsusb.ko ]; then \
>>       rm -f /lib/modules/2.6.12-gentoo-r10/misc/wcfxsusb.ko; \
>>   fi; \
>>   rm -f /lib/modules/2.6.12-gentoo-r10/misc/wcfxs.ko; \
>>else \
>>   for x in ztdummy.o ztdummy.o; do \
>>       install -D -m 644 $x /lib/modules/2.6.12-gentoo-r10/misc/$x ; \
>>   done; \
>>   if ! [ -f wcfxsusb.o ]; then \
>>       rm -f /lib/modules/2.6.12-gentoo-r10/misc/wcfxsusb.o; \
>>   fi; \
>>   rm -f /lib/modules/2.6.12-gentoo-r10/misc/wcfxs.o; \
>>fi
>>install -D -m 755 libtonezone.so /usr/lib/libtonezone.so.1.0
>>[ `id -u` = 0 ] && /sbin/ldconfig || :
>>rm -f /usr/lib/libtonezone.so
>>ln -sf libtonezone.so.1.0 \
>>   /usr/lib/libtonezone.so.1
>>ln -sf libtonezone.so.1.0 \
>>   /usr/lib/libtonezone.so
>>if [ -x /usr/sbin/sestatus ] && (/usr/sbin/sestatus | grep "SELinux 
>>status:" | grep -q "enabled") ; then restorecon -v 
>>/usr/lib/libtonezone.so; fi
>>install -D -m 644 zaptel.h /usr/include/linux/zaptel.h
>>install -D -m 644 torisa.h /usr/include/linux/torisa.h
>>install -D -m 644 tonezone.h /usr/include/tonezone.h
>>install -m 644 doc/ztcfg.8 /usr/share/man/man8
>>install -m 644 doc/zttool.8 /usr/share/man/man8
>>if [ -n "/etc/modules.d/zaptel" ]; then \
>>   if [ -f /etc/modules.d/zaptel ]; then mv -f /etc/modules.d/zaptel 
>>/etc/modules.d/zaptel.bak ; fi; \
>>   cat /etc/modules.d/zaptel.bak | grep -v "alias char-major-250" | \
>>   grep -v "post-install torisa /sbin/ztcfg" | \
>>   grep -v "post-install wcfxsusb /sbin/ztcfg" | \
>>   grep -v "alias wctdm" | \
>>   grep -v "post-install wctdm /sbin/ztcfg" > /etc/modules.d/zaptel; \
>>   if ! grep "options torisa" /etc/modules.d/zaptel; then \
>>       echo "options torisa base=0xd0000" >> /etc/modules.d/zaptel; \
>>   fi; \
>>   if ! grep "alias char-major-196" /etc/modules.d/zaptel; then \
>>       echo "alias char-major-196 torisa" >> /etc/modules.d/zaptel; \
>>   fi; \
>>   for x in ztdummy ztdummy; do \
>>       if ! grep -q "post-install $x" /etc/modules.d/zaptel; then \
>>           if ! grep -q "install $x " /etc/modules.d/zaptel; then \
>>               if [ "$x" != "zaptel" ] ; then \
>>                   if [ -f zaptel.ko ]; then echo "install $x 
>>/sbin/modprobe --ignore-install $x && /sbin/ztcfg" >> 
>>/etc/modules.d/zaptel; \
>>                   else echo "post-install $x /sbin/ztcfg" >> 
>>/etc/modules.d/zaptel; \
>>                   fi; \
>>               fi; \
>>           fi; \
>>       fi; \
>>   done; \
>>   if ! grep "ias wcfxs" /etc/modules.d/zaptel; then \
>>       echo "alias wcfxs wctdm" >> /etc/modules.d/zaptel; \
>>   fi; \
>>   if ! grep "alias wct2xxp" /etc/modules.d/zaptel; then \
>>       echo "alias wct2xxp wct4xxp" >> /etc/modules.d/zaptel; \
>>   fi; \
>>fi
>>options torisa base=0xd0000
>>alias char-major-196 torisa
>>if [ -d /etc/modutils ]; then \
>>   /sbin/update-modules ; \
>>fi
>>[ `id -u` = 0 ] && /sbin/depmod -a 2.6.12-gentoo-r10 || :
>>[ -f /etc/zaptel.conf ] || install -D -m 644 zaptel.conf.sample 
>>/etc/zaptel.conf
>>
>>thanks in advance
>>---
>>Miguel
>>
>>_______________________________________________
>>--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
>>    
>>
>
>  
>




More information about the asterisk-users mailing list