Default to 'N' in `remove` confirmation.

Rather than require a response, use 'N' as the default since this is a
destructive action.
This commit is contained in:
William Melody 2015-09-15 11:30:30 -07:00
parent 871e8fc131
commit ab8934ae80
1 changed files with 2 additions and 5 deletions

7
hosts
View File

@ -999,18 +999,15 @@ remove() {
printf "Removing the following records:\n%s\n" "$target_records" printf "Removing the following records:\n%s\n" "$target_records"
while true while true
do do
read -p "Are you sure you want to proceed? [y/n] " yn read -p "Are you sure you want to proceed? [y/N] " yn
case $yn in case $yn in
[Yy]* ) [Yy]* )
break break
;; ;;
[Nn]* ) * )
printf "Exiting...\n" printf "Exiting...\n"
exit 0 exit 0
;; ;;
* )
printf "Please answer yes or no.\n"
;;
esac esac
done done
fi fi