IS_DUPLICATE_FS_LABEL: Exclude EFI_SYSPART

EFI_SYSPART is (and should be) on all disks when using soft raid.
This commit is contained in:
Benoît S. 2019-02-12 12:10:42 +01:00
parent a9d26a49b4
commit 77afe63bc5

View file

@ -774,7 +774,9 @@ if [ -e /etc/debian_version ]; then
# Do it only if thereis blkid binary
if [ -x "$(which blkid)" ]; then
tmpFile=$(mktemp -p /tmp)
for part in $(blkid | grep -v raid_member | grep -Eo ' LABEL=".*"' | cut -d'"' -f2); do
parts=$(blkid | grep -ve raid_member -e EFI_SYSPART \
| grep -Eo ' LABEL=".*"' | cut -d'"' -f2)
for part in $parts; do
echo "$part" >> "$tmpFile"
done
tmpOutput=$(sort < "$tmpFile" | uniq -d)