]> xenbits.xensource.com Git - people/aperard/osstest.git/commitdiff
preseed_create: osstest-erase-other-disks: workaround creating /dev/sdXD files
authorAnthony PERARD <anthony.perard@citrix.com>
Wed, 11 Oct 2023 11:02:55 +0000 (11:02 +0000)
committerAnthony PERARD <anthony.perard@citrix.com>
Mon, 18 Mar 2024 16:09:57 +0000 (16:09 +0000)
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

index 7d6f97787b68b744a08640dffba83aa2230652ec..36c055510b7a694599deb3433685a5d4d9a0c960 100644 (file)
@@ -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 ===