Skip to content

Commit f881f2f

Browse files
committed
fix: detect lingering mounts in the installer correctly
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> (cherry picked from commit 23984ef)
1 parent 47ede0c commit f881f2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/installer/pkg/install/manifest.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ func (m *Manifest) checkMounts(device Device) error {
227227
}
228228
}
229229

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

0 commit comments

Comments
 (0)