mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-08-07 17:53:45 +00:00
Fix for util-linux, no lsblk
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
parent
0d84a352cb
commit
dbf0ec2bfc
@ -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
|
||||
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user