Skip to content

Commit

Permalink
fix: Skip wipe of live usb device.
Browse files Browse the repository at this point in the history
  • Loading branch information
simonfogliato committed Dec 31, 2024
1 parent 18fe4b7 commit 813eb13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion package/harvester-os/files/usr/sbin/harv-install
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ clear_disk_label()
echo "wiping all disks"
for disk in $(lsblk -d -n -J -o NAME,TYPE | jq -r '.blockdevices[] | select(.type == "disk") | .name')
do
if [ "/dev/$disk" == "$(grep '/run/initramfs/live' /proc/mounts | sed -n 's/[0-9].*//p')" ]; then
if [ "/dev/$disk" == "$(grep $ISOMNT /proc/mounts | sed -n 's/[0-9].*//p')" ]; then
continue
fi
sgdisk -Z /dev/$disk
Expand Down

0 comments on commit 813eb13

Please sign in to comment.