Correct if statement

This commit is contained in:
Phillip 2024-09-07 22:30:21 +01:00
parent e5531e6244
commit 0aa69778fb

View File

@ -33,16 +33,16 @@ case $yesno in
esac esac
# Ask if a home partition should be wiped # Ask if a home partition should be wiped
if test -z "$homepar"; then if test -z "$homepar"; then
read -p 'Do you wish to wipe the home partition? ' wipeyesno read -p 'Do you wish to wipe the home partition? ' wipeyesno
case $wipeyesno in case $wipeyesno in
[yesYesYy]* ) [yesYesYy]* )
mkfs.ext4 /dev/$homepar mkfs.ext4 /dev/$homepar
;; ;;
[noNoNn]* ) [noNoNn]* )
echo "The home partition will not be wiped" echo "The home partition will not be wiped"
;; ;;
* ) echo "Please answer yes (Yes, y, Y) or no (No, n, N)";; * ) echo "Please answer yes (Yes, y, Y) or no (No, n, N)";;
esac esac
fi fi
# Get user credentials # Get user credentials
read -p "Please enter a username " username read -p "Please enter a username " username