Fix for util-linux, no lsblk

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
Justin Cormack 2016-08-22 19:08:26 +01:00
parent 0d84a352cb
commit dbf0ec2bfc
2 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ start()
{
ebegin "Configuring host block device"
DEV="$(lsblk -r | grep ' disk $' | awk '{print $1}' | head -1 )"
DEV="$(find /dev -maxdepth 1 -type b ! -name 'loop*' | grep -v '[0-9]$' | sed 's@.*/dev/@@' | head -1 )"
[ -z ${DEV} ] && exit 1

View File

@ -1,7 +1,7 @@
#!/bin/sh
printf '\n'
DEV="$(lsblk -r | grep ' disk $' | awk '{print $1}' | head -1 )"
DEV="$(find /dev -maxdepth 1 -type b ! -name 'loop*' | grep -v '[0-9]$' | sed 's@.*/dev/@@' | head -1 )"
[ $? -eq 0 ] && printf "✓ Drive found: $DEV\n" || printf "✗ No drive found\n"
DEV=$(mount | grep '/dev/.*da. on /var type')
[ $? -eq 0 ] && printf "✓ Drive mounted: $DEV\n" || printf "✗ No drive mounted\n"