IS_DUPLICATE_FS_LABEL: blkid has a cache that can provoke false positive #124

Manually merged
benpro merged 3 commits from IS_DUPLICATE_FS_LABEL-blkid-fix into master 2020-06-26 08:51:45 +02:00
Showing only changes of commit 652fcdbe44 - Show all commits

View file

@ -1013,7 +1013,7 @@ check_duplicate_fs_label() {
BLKID_BIN=$(command -v blkid)
if [ -x "$BLKID_BIN" ]; then
tmpFile=$(mktemp -p /tmp)
parts=$($BLKID_BIN | grep -ve raid_member -e EFI_SYSPART | grep -Eo ' LABEL=".*"' | cut -d'"' -f2)
parts=$($BLKID_BIN -c /dev/null | grep -ve raid_member -e EFI_SYSPART | grep -Eo ' LABEL=".*"' | cut -d'"' -f2)
for part in $parts; do
echo "$part" >> "$tmpFile"
done