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
2 changed files with 2 additions and 1 deletions

View file

@ -8,6 +8,7 @@ and this project **does not adhere to [Semantic Versioning](http://semver.org/sp
### Changed
* IS_EVOBACKUP_EXCLUDE_MOUNT: exclude disabled backup scripts
* IS_DUPLICATE_FS_LABEL: disable blkid cache
### Deprecated

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