fixes
This commit is contained in:
parent
51b3787597
commit
d0d7bd8cfe
|
@ -16,6 +16,12 @@ for i in $(find /dev/disk/by-id/ -type l -printf "%P\n"|grep -v "part" |tac); do
|
||||||
if [[ "${name}" == *"/dev/sr"* ]]; then
|
if [[ "${name}" == *"/dev/sr"* ]]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
if [[ ! "${name}" == "ata-"* ]]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
if [[ ! "${name}" == "usb-"* ]]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
index=$(( index + 1 ))
|
index=$(( index + 1 ))
|
||||||
size="$(fdisk -l "${name}" | head -n1 | awk '{print $3}')"
|
size="$(fdisk -l "${name}" | head -n1 | awk '{print $3}')"
|
||||||
size=$(awk "BEGIN { printf(\"%.0f\n\", ${size}); }")
|
size=$(awk "BEGIN { printf(\"%.0f\n\", ${size}); }")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user