From 34e1432e7062e251591e29b88b67542e4703e19f Mon Sep 17 00:00:00 2001 From: "Kevin Veen-Birkenbach [aka. Frantz]" Date: Sat, 26 Sep 2020 17:12:13 +0200 Subject: [PATCH] Added option to delete partition table --- README.md | 1 + scripts/image/setup.sh | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/README.md b/README.md index 3e605e4..188e13e 100644 --- a/README.md +++ b/README.md @@ -91,6 +91,7 @@ To pase the configuration to the program use this syntax: #echo "n" # ├── If arch: Should a encrypted setup be used? (y/n) echo "n" # | Should the image download be forced?(y/n) echo "n" # | Should the image be transfered to $device_path?(y/n) + #echo "n" # ├── Delete the partition table? (y/n) #echo "n" # ├── Overwrite device before copying? (y/n) echo "n" # | Should the password be changed?(y/N) #echo "test12345" # ├── The user password_1 diff --git a/scripts/image/setup.sh b/scripts/image/setup.sh index dd7269b..2d5a788 100644 --- a/scripts/image/setup.sh +++ b/scripts/image/setup.sh @@ -203,6 +203,15 @@ question "Should the image be transfered to $device_path?(y/N)" && read -r trans if [ "$transfer_image" = "y" ] then + question "Should the partition table of $device_path be deleted?(y/N)" && read -r delete_partition_table + if [ "$delete_partition_table" = "y" ] + then + info "Deleting..." && + wipefs -a "$device_path" || error + else + info "Skipping partition table deletion..." + fi + overwritte_device_with_zeros info "Starting image transfer..."