dmraid: How best to detect if dmraid devices are present
Frans Pop <[email protected]>
| Newsgroups | gmane.linux.ataraid |
|---|---|
| Message-ID | <[email protected]> |
Hello, I've been working on implementing dmraid support in the Debian Installer, and have been using 'dmraid -s -c' to detect if any dmraid sets are present. Problem with that is that 'dmraid -s -c' will in at least two situations exit zero and display what for my purposes is effectively an error message on stdout: - no block devices found - No RAID disks Having to grep for these messages is of course not very clean, especially as I can't be sure to cover all possible conditions. Was there a particular reason why it was decided to exit 0 in those cases and direct those messages to stdout instead of stderr? Would it be an option to change this? Is there perhaps a better way to detect if any dmraid devices are present that does not suffer from this issue? An alternative I was thinking of myself is the following, but that is still not very clean: # dmraid -s -c r,t --sep "%" | grep "%" | cut -d% -f1 Thanks in advance, Frans Pop Debian Installer developer _______________________________________________ Ataraid-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/ataraid-list
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBGnZBwgm/Kwh6ICoQRAg7hAJ0RWq1yzhdFaL0uvlYLM3/uzEqhWgCgyJ9u fzSEHcWVNYLb8rbSTgYzLjk= =CmJ3 -----END PGP SIGNATURE-----