[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#276475: Doesn't ignore .dpkg* files in /etc/discover.d/



Package: discover1
Version: 1.7.2
Severity: important
Tags: patch

As it is currently written, discover1 will not ignore files in
/etc/discover.d/ that end in .dpkg-old.

Here is a patch that fixes this.

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing'), (50, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.8.1
Locale: LANG=en_IE@euro, LC_CTYPE=en_IE@euro
--- discover.init_ORIG	2004-10-13 23:26:09.000000000 +0200
+++ discover.init	2004-10-14 13:11:56.000000000 +0200
@@ -68,13 +68,12 @@
 read_configuration "$CONFFILE"
 read_configuration "$SKIPFILE"
 
-for part in /etc/discover.d/*; do
-    if [ "$part" = '/etc/discover.d/*' ]; then
-        break
-    fi
-
-    read_configuration "$part"
-done
+SKIPFILE_DIR="/etc/discover.d"
+if [ -d "$SKIPFILE_DIR" ] ; then
+    for part in $(run-parts --list "$SKIPFILE_DIR" 2>/dev/null || true); do
+        read_configuration "$part"
+    done
+fi
 
 # Detect hardware:
 echo -n "Detecting hardware: " >&2

Reply to: