Project

General

Profile

« Previous | Next » 

Revision d803d4cf

Added by Paolo Dongilli almost 5 years ago

  • ID d803d4cf3162dfb8c55a3f49bc6ef69d391ed61c
  • Parent a1471122

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