Hello, When I mdconfig a device and _do not_ specify a particular numbered md device (with the -u flag), it just chooses an unused device number for me. Which makes me happy.
Unfortunately, mdconfig chooses the next available device, from the highest device currently in use, regardless of whether or not there are much lower devices unused. For instance, if I have md0 and md1 in use, mdconfig will auto choose md2. Good. However if I only have md10 and md11 in use, mdconfig will NOT choose md0, it will choose md12. I need it to choose the lowest available unused device. How can I do this in a bit of /bin/sh shell code ? I can check what devices are in use with `mdconfig -l`, like so: # mdconfig -l md0 and I know how to use awk to strip away the leading "md" from each piece of the output ... but I do not know how to take output like: 8 9 11 14 and decide that the lowest available number is "0". How can I do this ? Thank you. _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"