From 5f74483a3203d8875d65eac4e66122693103048a Mon Sep 17 00:00:00 2001 From: Justin Cormack Date: Mon, 10 Oct 2016 15:09:54 +0100 Subject: [PATCH] Sort block devices See #589 for discussion. Signed-off-by: Justin Cormack --- alpine/packages/automount/etc/init.d/automount | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alpine/packages/automount/etc/init.d/automount b/alpine/packages/automount/etc/init.d/automount index 6426e907c..58961a9ae 100755 --- a/alpine/packages/automount/etc/init.d/automount +++ b/alpine/packages/automount/etc/init.d/automount @@ -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