mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-23 19:05:37 +00:00
Sort block devices
See #589 for discussion. Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
parent
1b529e5763
commit
5f74483a32
@ -26,7 +26,7 @@ start()
|
|||||||
then
|
then
|
||||||
DEV="sda"
|
DEV="sda"
|
||||||
else
|
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
|
fi
|
||||||
|
|
||||||
[ -z "${DEV}" ] && exit 1
|
[ -z "${DEV}" ] && exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user