tags 572450: + patch thanks On Thu, Mar 04, 2010 at 11:58:22AM +0100, Olivier Berger wrote: > > The sys handler executes /sbin/mdadm -Q --detail /dev/md?* unconditionally, > even though there are no raid devices, which leads to an error reported by > mdadm, then reported to the user, which is quite frightening. > > I suggest to add a test on existence of these /dev/md* files before issueing > mdadm. >
The following test seems to do the trick : STATUS="Collecting Software RAID information (/sbin/mdadm -Q)" if [ -n "$(ls /dev/md?* 2>/dev/null || true)" ]; then catifexec "/sbin/mdadm" "-Q" "--detail" '/dev/md?*' else catifexec "/bin/echo" "No RAID devide found as '/dev/md?*'" fi Hope this helps. Best regards, -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org