Project

General

Profile

Revision d803d4cf

IDd803d4cf3162dfb8c55a3f49bc6ef69d391ed61c
Parent a1471122

Added by Paolo Dongilli 5 months ago

modified device discovery command in getDisk()

View differences:

script
22 22
}
23 23

  
24 24
getDisk(){
25
    for i in $(ls /sys/block/ | grep -Ev '(loop|sr|dvd|cd)')
25
    for i in $(lsblk -d -n -o NAME | grep -Ev '(loop|sr|dvd|cd)')
26 26
    do
27 27
        if [ $(cat /sys/block/$i/removable) -eq 0 ];then
28 28
            myDevice="${myDevice} $i"

Also available in: Unified diff