Re: Bug#502823: iodine: piuparts test fails: /var/lib/dpkg/info/iodine.postinst: line 27: ./MAKEDEV: No such file or directory
gregor herrmann schrieb am Monday, den 20. October 2008:
> On Mon, 20 Oct 2008 07:28:07 +0200, Lucas Nussbaum wrote:
>
> > During tests using piuparts of all packages in lenny,
> > I ran into the following problem:
>
> Thanks for your tests and the bug report!
>
> > > Setting up udev (0.125-7) ...
> > > unable to open device '/class/net/*'
> > > A chroot environment has been detected, udev not started.
> [..]
> > > /var/lib/dpkg/info/iodine.postinst: line 27: ./MAKEDEV: No such file or directory
> > > dpkg: error processing iodine (--configure):
> > > subprocess post-installation script returned error exit status 1
> > > Errors were encountered while processing:
> > > iodine
> > > E: Sub-process /usr/bin/dpkg returned an error code (1)
>
> Ah, fun with udev in a chroot.
> But unconditionally calling MAKEDEV in postinst is of course no good
> idea ...
>
> After looking at some other .postinst files I have prepared the
> following patch now:
>
> #v+
>
> Index: debian/postinst
> ===================================================================
> --- debian/postinst (revision 1469)
> +++ debian/postinst (working copy)
> @@ -23,8 +23,11 @@
> case "$1" in
> configure)
> # we need a tun device
> - echo "Creating device /dev/net/tun ..."
> - cd /dev && ./MAKEDEV tun
> + if [ ! -c /dev/net/tun ] && [ -x /dev/MAKEDEV ] ; then
> + echo "Creating device /dev/net/tun ..."
> + cd /dev
> + ./MAKEDEV tun || true
> + fi
> # and we want a special user
> adduser --quiet --system --home /var/run/iodine iodine
> # generate /etc/default/iodine
*snipp*
> Any comments on the patch?
if [ -d "/dev/.static" ]; then
cd /dev/.static
./MAKEDEV ....
else
cd /dev/
./MAKEDEV
fi
Should be nicer.
Alex
Reply to: