Merge pull request #680 from justincormack/diagnostics-mount

Improve matching of mounted drive in diagnostics
This commit is contained in:
Justin Cormack 2016-11-04 15:24:44 +00:00 committed by GitHub
commit f7d275918e

View File

@ -3,7 +3,7 @@
printf '\n'
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')
DEV=$(mount | grep '/dev/.* on /var type')
[ $? -eq 0 ] && printf "✓ Drive mounted: $DEV\n" || printf "✗ No drive mounted\n"
INET=$(ifconfig eth0 2> /dev/null | grep 'inet addr')
[ $? -eq 0 ] && printf "✓ Network connected: $INET\n" || printf "✗ No network connection\n"