diff mbox series

[OSSTEST,09/36] preseed_create: osstest-erase-other-disks: workaround creating /dev/sdXD files

Message ID 20240318165545.3898-10-anthony.perard@citrix.com (mailing list archive)
State New, archived
Headers show
Series Switch to Debian Bookworm | expand

Commit Message

Anthony PERARD March 18, 2024, 4:55 p.m. UTC
Sometime, it can happen that the erase-other-disks script fails and
indicate that /dev/sda1 isn't a block device anymore. This happened
when /dev/sda was erased before /dev/sda1. So to avoid this, we will
zero the partitions of ${disk} first, and hopefully the error won't
happen again.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
 Osstest/Debian.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index 7d6f9778..36c05551 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -1305,7 +1305,7 @@  for sd in sd hd; do
     udevadm settle
     log "\${sd} devices present after: `echo /dev/\${sd}*`"
 done
-for dev in ${disk}*; do
+for dev in ${disk}?* ${disk}*; do
     zero
 done
 echo ===