Bug#361312: postinst failure

Tzafrir Cohen tzafrir.cohen at xorcom.com
Fri Jun 9 04:35:17 UTC 2006


On Fri, Jun 09, 2006 at 11:40:19AM +0800, Jim Barber wrote:
> This problem also happened to me.
> 
> I too don't have any Zaptel hardware.
> I installed the zaptel-source package so that I could compile the 
> ztdummy module that provides the timing support required to get MeetMe 
> working in Asterisk in the absence of any Zaptel hardware.
> After installing the zaptel-modules-2.6.15-1-686 produced by 
> module-assistant, along with the zaptel package that is a dependency, I 
> encountered the same error.
> 
> The problem occured because the /dev/zap/* devices didn't exist.
> I'm not sure if these would have existed if I had have been running 
> DevFS or udev; but on my system I'm using the traditional /dev/ directory.
> 
> I created a quick script to create the appropriate devices (after a bit 
> of searching on the net).
> Once I had them in place, then the zaptel package installed just fine.
> 
> The script I wrote to create the appropriate devices follows:

This should be done by the postinst script of the package
http://svn.debian.org/wsvn/pkg-voip/zaptel/trunk/debian/zaptel.postinst?op=file&rev=0&sc=0

A snippet from it:

DYNFS=`ps ax | grep -v grep`

case "$1" in
    configure)

        #MAKEDEV zaptel

        if ! echo $DYNFS | grep -q devfsd || echo $DYNFS | grep -q udevd ; then	
                mkdir -p /dev/zap
                rm -f /dev/zap/ctl
                       rm -f /dev/zap/channel
                rm -f /dev/zap/pseudo
                rm -f /dev/zap/timer
                rm -f /dev/zap/253
                rm -f /dev/zap/252
                rm -f /dev/zap/251
                rm -f /dev/zap/250
                mknod /dev/zap/ctl c 196 0
                mknod /dev/zap/timer c 196 253
                mknod /dev/zap/channel c 196 254
                mknod /dev/zap/pseudo c 196 255
                N=1; 
                for N in `seq 250`; do
                        rm -f /dev/zap/$N; 
                        mknod /dev/zap/$N c 196 $N; 
                        N=`expr $N + 1` 
                done
                chown 0:dialout /dev/zap/ -R
                chmod 0660 /dev/zap/*
        else
                echo "**** Dynamic filesystem detected -- not creating device nodes"
                echo "**** If you are running udev, read README.Debian"
        fi

    ;;



(I know, I know: N=1 and the "N++" there are useless, and the grrrep above 
could be done more efficiently)

> 
> -------------
> #!/bin/bash
> 
> if [[ $(id -u) != 0 ]]
> then
>        echo "You must be root to run this." >&2
>        exit 1
> fi
> 
> [[ -d /dev/zap ]] || mkdir /dev/zap
> [[ -c /dev/zap/ctl ]] || mknod /dev/zap/ctl c 196 0
> [[ -c /dev/zap/timer ]] || mknod /dev/zap/timer c 196 253
> [[ -c /dev/zap/channel ]] || mknod /dev/zap/channel c 196 254
> [[ -c /dev/zap/pseudo ]] || mknod /dev/zap/pseudo c 196 255
> 
> chown root:dialout /dev/zap/ctl /dev/zap/timer /dev/zap/channel 
> /dev/zap/pseudo
> chmod 660 /dev/zap/ctl /dev/zap/timer /dev/zap/channel /dev/zap/pseudo

Any chance you could check if reconfiguring zaptel would have solved the
same problem on your system?

-- 
Tzafrir Cohen      sip:tzafrir at local.xorcom.com
icq#16849755       iax:tzafrir at local.xorcom.com
+972-50-7952406           
tzafrir.cohen at xorcom.com  http://www.xorcom.com




More information about the Pkg-voip-maintainers mailing list