forked from evolix/evocheck
Use blkid in place of lsblk
This commit is contained in:
parent
a2fef6cb9b
commit
75e69e1440
|
@ -745,10 +745,10 @@ if [ -e /etc/debian_version ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$IS_DUPLICATE_FS_LABEL" = 1 ]; then
|
if [ "$IS_DUPLICATE_FS_LABEL" = 1 ]; then
|
||||||
# Only on systems which have lsblk
|
# Do it only if thereis blkid binary
|
||||||
if [ -x "$(which lsblk)" ]; then
|
if [ -x "$(which blkid)" ]; then
|
||||||
tmpFile=$(mktemp -p /tmp)
|
tmpFile=$(mktemp -p /tmp)
|
||||||
for part in $(lsblk -n -o LABEL); do
|
for part in $(blkid | grep -v raid_member | grep -Eo 'LABEL=".*"' | cut -d'"' -f2); do
|
||||||
echo "$part" >> "$tmpFile"
|
echo "$part" >> "$tmpFile"
|
||||||
done
|
done
|
||||||
tmpOutput=$(sort < "$tmpFile" | uniq -d)
|
tmpOutput=$(sort < "$tmpFile" | uniq -d)
|
||||||
|
|
Loading…
Reference in a new issue