«
Previous
|
Next
»
Revision d803d4cf
Added by Paolo Dongilli over 5 years ago
- ID d803d4cf3162dfb8c55a3f49bc6ef69d391ed61c
- Parent a1471122
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
modified device discovery command in getDisk()