Merge pull request #596 from justincormack/automount-sort

Sort block devices
This commit is contained in:
Justin Cormack
2016-10-10 15:17:12 +01:00
committed by GitHub

View File

@@ -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