Commit 2e873e9
committed
initrd/gpg: add LUKS cleanup trap and fix partition derivation
- Add EXIT trap to reprovision_smartcard_from_backup() that unmounts
/media and closes any leftover usb_mount LUKS mappings. Error paths
that return early after opening LUKS would otherwise leave stale
crypto mappings, blocking subsequent USB backup drive access.
- Fix partition derivation: use sed -E s/[0-9]+$// without the (p?)
capture group that was removing the p separator from NVMe/MMC devices
(nvme0n1p1 -> nvme0n1, producing nvme0n12 instead of nvme0n1p2).
Signed-off-by: Thierry Laurion <insurgo@riseup.net>1 parent 1d3bfcb commit 2e873e9
1 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
448 | 448 | | |
449 | 449 | | |
450 | 450 | | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
451 | 454 | | |
452 | 455 | | |
453 | 456 | | |
| |||
0 commit comments