Sort block devices

See #589 for discussion.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
Justin Cormack 2016-10-10 15:09:54 +01:00
parent 1b529e5763
commit 5f74483a32

View File

@ -26,7 +26,7 @@ start()
then
DEV="sda"
else
DEV="$(find /dev -maxdepth 1 -type b ! -name 'loop*' | grep -v '[0-9]$' | sed 's@.*/dev/@@' | head -1 )"
DEV="$(find /dev -maxdepth 1 -type b ! -name 'loop*' | grep -v '[0-9]$' | sed 's@.*/dev/@@' | sort | head -1 )"
fi
[ -z "${DEV}" ] && exit 1