Additional check for block device 24/824/1
authorJanne Suominen <janne.suominen@nokia.com>
Fri, 24 May 2019 09:16:08 +0000 (12:16 +0300)
committerJanne Suominen <janne.suominen@nokia.com>
Fri, 24 May 2019 09:16:22 +0000 (12:16 +0300)
This will fix the installation if there is existing partitions.
The check is needed since the data is cached and wiping will be
done first to the actual disk and then to the partition. If such
partition does not exist then it will create a file instead.

Change-Id: I6f8f9388adb20b7d8496be38ad3676576f2eee6a
Signed-off-by: Janne Suominen <janne.suominen@nokia.com>
work/dib-ipa-element/virtmedia-netconf/ironic-virtmedia-netconfig/bin/erase-oldfs.sh

index 0b65e7f..4e2c909 100755 (executable)
@@ -61,6 +61,8 @@ else
         if [ -b /dev/$hd_dev ] && (( is_removable $hd_dev ) || ( is_partition $hd_dev ) || ( is_loop $hd_dev )); then
             echo "Removable or partition $hd_dev. Skipping..."
             continue
+        elif ! [ -b /dev/$hd_dev ]; then
+             continue
         fi
         wipefs --all /dev/$hd_dev
         sgdisk -Z -o /dev/$hd_dev