Bug#361312: postinst failure

Jim Barber jim.barber at ddihealth.com
Fri Jun 9 08:31:28 UTC 2006


I'm sorry. It seems I was wrong.
The devices do indeed get created okay...

Just to document a full install with the failure, I did a test for you on a virtual machine I have running here:

   Check that Zaptel packages aren't installed.

	debtest:~# dpkg --list | grep zap
	debtest:~#

   Check that the Zaptel devices don't exist.

	debtest:~# ls -l /dev/zap
	ls: /dev/zap: No such file or directory

   Install the zaptel package from unstable

	debtest:~# apt-get install zaptel/unstable
	Reading package lists... Done
	Building dependency tree... Done
	Selected version 1:1.2.5-1 (Debian:unstable) for zaptel
	The following NEW packages will be installed
	  zaptel
	0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
	Need to get 0B/71.0kB of archives.
	After unpacking 446kB of additional disk space will be used.
	Selecting previously deselected package zaptel.
	(Reading database ... 38959 files and directories currently installed.)
	Unpacking zaptel (from .../zaptel_1%3a1.2.5-1_i386.deb) ...
	Setting up zaptel (1.2.5-1) ...
	Zaptel cards initial configuration: Notice: Configuration file is /etc/zaptel.conf

	line 0: Unable to open master device '/dev/zap/ctl'

	1 error(s) detected

	invoke-rc.d: initscript zaptel, action "start" failed.
	dpkg: error processing zaptel (--configure):
	 subprocess post-installation script returned error exit status 1
	Errors were encountered while processing:
	 zaptel
	E: Sub-process /usr/bin/dpkg returned an error code (1)

   Failed... Check if the devices were created:

	debtest:~# ls /dev/zap
	1    113  128  142  157  171  186  20   214  229  243  32  47  61  76  90
	10   114  129  143  158  172  187  200  215  23   244  33  48  62  77  91
	100  115  13   144  159  173  188  201  216  230  245  34  49  63  78  92
	101  116  130  145  16   174  189  202  217  231  246  35  5   64  79  93
	102  117  131  146  160  175  19   203  218  232  247  36  50  65  8   94
	103  118  132  147  161  176  190  204  219  233  248  37  51  66  80  95
	104  119  133  148  162  177  191  205  22   234  249  38  52  67  81  96
	105  12   134  149  163  178  192  206  220  235  25   39  53  68  82  97
	106  120  135  15   164  179  193  207  221  236  250  4   54  69  83  98
	107  121  136  150  165  18   194  208  222  237  26   40  55  7   84  99
	108  122  137  151  166  180  195  209  223  238  27   41  56  70  85  channel
	109  123  138  152  167  181  196  21   224  239  28   42  57  71  86  ctl
	11   124  139  153  168  182  197  210  225  24   29   43  58  72  87  pseudo
	110  125  14   154  169  183  198  211  226  240  3    44  59  73  88  timer
	111  126  140  155  17   184  199  212  227  241  30   45  6   74  89
	112  127  141  156  170  185  2    213  228  242  31   46  60  75  9

   They were, so your code works just fine in the postinst script
   Try to reconfigure the package:

	debtest:~# dpkg --configure -a
	Setting up zaptel (1.2.5-1) ...
	Zaptel cards initial configuration: Notice: Configuration file is /etc/zaptel.conf

	line 0: Unable to open master device '/dev/zap/ctl'

	1 error(s) detected

	invoke-rc.d: initscript zaptel, action "start" failed.
	dpkg: error processing zaptel (--configure):
	 subprocess post-installation script returned error exit status 1
	Errors were encountered while processing:
	 zaptel

So what I think actually allowed me to do the install of zaptel was that I forced the install of the compiled
zaptel-modules-2.6.15-1-686 source by doing something like:

	# dpkg --ignore-depends=zaptel -i zaptel-modules-2.6.15-1-686_1.2.5-1+2.6.15-8_i386.deb
	# modprobe ztdummy

That forced the install of the modules I compiled, and then loaded up the dummy driver which probably now listens on the
/dev/zap/ctl device that the failed install of the zaptel package created.
Then upon reinstalling zaptel, it was able to successfully open the /dev/zap/ctl device and configure itself.

So the fix then, to not try and start up zaptel automatically at the end of postinst, OR start it up but force a success return code
if it does fail to start?
Maybe with an appropriate error message?

It's a bit of a chicken and egg problem because you need the drivers for the zaptel startup to work, but the zaptel install needs to
happen before you install the drivers...

Regards,

----------
Jim Barber
DDI Health




More information about the Pkg-voip-maintainers mailing list