Skip to content

Commit

Permalink
fix: detect lingering mounts in the installer correctly
Browse files Browse the repository at this point in the history
Not sure how and when it got broken, but we're looking for mounts for
the blockdevice (like `/dev/vda`), while the actual mount info contains
the partition device (like `/dev/vda6`).

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
  • Loading branch information
smira committed Apr 19, 2022
1 parent 54dba92 commit 23984ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/installer/pkg/install/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ func (m *Manifest) checkMounts(device Device) error {
}
}

if fields[len(fields)-2] == device.Device {
if strings.HasPrefix(fields[len(fields)-2], device.Device) {
return fmt.Errorf("found active mount in %q for %q: %s", path, device.Device, scanner.Text())
}
}
Expand Down

0 comments on commit 23984ef

Please sign in to comment.