m/n/c/localstorage: fix logic error determining ESP

The OS integration of the A/B update engine has a logic error which
caused it to provide all partitions as ESP, of which the last one
(the data partition) stuck.

Change-Id: Ia721f9f515ca65f710f07ba25b3be68544158a7c
Reviewed-on: https://review.monogon.dev/c/monogon/+/2030
Reviewed-by: Tim Windelschmidt <tim@monogon.tech>
Tested-by: Jenkins CI
diff --git a/metropolis/node/core/localstorage/crypt/blockdev.go b/metropolis/node/core/localstorage/crypt/blockdev.go
index 9f04660..099610d 100644
--- a/metropolis/node/core/localstorage/crypt/blockdev.go
+++ b/metropolis/node/core/localstorage/crypt/blockdev.go
@@ -164,7 +164,9 @@
 
 	part := table.Partitions[pi.partNumber-1]
 
-	updateSvc.ProvideESP("/esp", uint32(pi.partNumber), part)
+	if part.Type == gpt.PartitionTypeEFISystem {
+		updateSvc.ProvideESP("/esp", uint32(pi.partNumber), part)
+	}
 
 	nodePath := nodePathForPartitionType(part.Type)
 	if nodePath == "" {