mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-22 02:21:34 +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
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user