Package: udev
Version: 0.054-3
Severity: minor
Tags: patch

The command 'echo "done."' at the end of the 'restart' action is
sometimes not executed, even if the udev was successfully restarted.
The result is the following:

  [EMAIL PROTECTED]:~$ /etc/init.d/udev restart
  Recreating device [EMAIL PROTECTED]:~$ 

rather than the expected

        [EMAIL PROTECTED]:~$ /etc/init.d/udev restart
        Recreating device nodes...done.
        [EMAIL PROTECTED]:~$ 

This is because of the following line in the make_extra_nodes()
function:

  [ -e etc/udev/links.conf ] || return

If the file doesn't exist (eg. because the script is not being run from
the / directory), then the "return" is used.  As no return value is
specified, the function returns the exit status of the previous command -
the file test that just failed.  The script starts with

  #!/bin/sh -e 

so this is a fatal error, and the script exits without running the
remaining actions.

The following two-character change corrects this:

-----------------------------------------------------
--- udev.init   2005-03-26 14:09:45.262417264 +0000
+++ udev        2005-03-26 14:24:12.342601040 +0000
@@ -55,7 +55,7 @@
 
 # I hate this hack.  -- Md
 make_extra_nodes() {
-  [ -e etc/udev/links.conf ] || return
+  [ -e etc/udev/links.conf ] || return 0
   grep '^[^#]' /etc/udev/links.conf | \
   while read type name arg1; do
     [ "$type" -a "$name" -a ! -e "/dev/$name" -a ! -L "/dev/$name" ] ||continue
-----------------------------------------------------

Note: I am using dash as /bin/sh.  However, the same behaviour was
observed with bash, so (for once) dash isn't to blame.

-- Package-specific info:
-- /etc/udev/rules.d/:
/etc/udev/rules.d/:
total 28
lrwxrwxrwx  1 root root  19 2004-12-24 18:15 10-cd-aliases.rules -> 
../cd-aliases.rules
-rw-r--r--  1 root root 133 2005-02-19 11:20 40-eio.rules
-rw-r--r--  1 root root 537 2005-03-16 14:21 40-iapp.rules
-rw-r--r--  1 root root 127 2005-02-19 17:39 40-innopod.rules
-rw-r--r--  1 root root 162 2005-03-12 22:19 40-iriver.rules
-rw-r--r--  1 root root 275 2005-03-11 18:50 40-joypad.rules
-rw-r--r--  1 root root  37 2005-02-06 20:33 40-lirc.rules
-rw-r--r--  1 root root 220 2005-02-19 12:57 40-mouse.rules
lrwxr-xr-x  1 root root  13 2004-08-01 10:39 50-udev.rules -> ../udev.rules

-- /sys/:
/sys/block/hda/dev
/sys/block/hda/hda1/dev
/sys/block/hda/hda2/dev
/sys/block/hda/hda3/dev
/sys/block/hda/hda4/dev
/sys/block/hda/hda5/dev
/sys/block/hda/hda6/dev
/sys/block/hda/hda7/dev
/sys/block/hda/hda8/dev
/sys/block/hdc/dev
/sys/block/ram0/dev
/sys/block/ram10/dev
/sys/block/ram11/dev
/sys/block/ram12/dev
/sys/block/ram13/dev
/sys/block/ram14/dev
/sys/block/ram15/dev
/sys/block/ram1/dev
/sys/block/ram2/dev
/sys/block/ram3/dev
/sys/block/ram4/dev
/sys/block/ram5/dev
/sys/block/ram6/dev
/sys/block/ram7/dev
/sys/block/ram8/dev
/sys/block/ram9/dev
/sys/class/cpuid/cpu0/dev
/sys/class/drm/card0/dev
/sys/class/graphics/fb0/dev
/sys/class/input/event0/dev
/sys/class/input/event1/dev
/sys/class/input/event2/dev
/sys/class/input/mice/dev
/sys/class/input/mouse0/dev
/sys/class/misc/agpgart/dev
/sys/class/misc/beep/dev
/sys/class/misc/fbsplash/dev
/sys/class/misc/psaux/dev
/sys/class/msr/msr0/dev
/sys/class/sound/adsp/dev
/sys/class/sound/audio1/dev
/sys/class/sound/audio/dev
/sys/class/sound/controlC0/dev
/sys/class/sound/controlC1/dev
/sys/class/sound/controlC2/dev
/sys/class/sound/controlC3/dev
/sys/class/sound/dsp1/dev
/sys/class/sound/dsp/dev
/sys/class/sound/mixer1/dev
/sys/class/sound/mixer/dev
/sys/class/sound/pcmC0D0c/dev
/sys/class/sound/pcmC0D0p/dev
/sys/class/sound/pcmC0D1c/dev
/sys/class/sound/pcmC0D2c/dev
/sys/class/sound/pcmC0D3c/dev
/sys/class/sound/pcmC0D4p/dev
/sys/class/sound/pcmC1D0c/dev
/sys/class/sound/pcmC1D0p/dev
/sys/class/sound/timer/dev

-- Kernel configuration:
 isapnp_init not present.


-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.10-ifp
Locale: LANG=en_GB.ISO8859-15, LC_CTYPE=en_GB.ISO8859-15 (charmap=ISO-8859-15)

Versions of packages udev depends on:
ii  hotplug                  0.0.20040329-17 Linux Hotplug Scripts
ii  initscripts              2.86.ds1-1      Standard scripts needed for bootin
ii  libc6                    2.3.2.ds1-20    GNU C Library: Shared libraries an
ii  makedev                  2.3.1-77        creates device files in /dev
ii  sed                      4.1.2-8         The GNU sed stream editor

-- debconf information:
  udev/devfs-warning:
* udev/reboot-warning:


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to