Merge branch 'feature/5' into develop

This commit is contained in:
Suikan 2021-07-04 15:33:50 +09:00
commit ac7b0bd932
2 changed files with 18 additions and 2 deletions

View file

@ -5,6 +5,8 @@ Record of the modification in project development.
### Added ### Added
### Changed ### Changed
- [Issue 5 : OVERWRITEINSTALL confirmation is missing](https://github.com/suikan4github/kaiten-yaki/issues/5)
### Deprecated ### Deprecated
### Removed ### Removed
### Fixed ### Fixed

View file

@ -70,9 +70,9 @@ function confirmation(){
return 1 # with error status return 1 # with error status
fi # if YES fi # if YES
# For sure ask to be sure to erase. # For sure ask to erase.
if [ "${ERASEALL}" -ne 0 ] ; then if [ "${ERASEALL}" -ne 0 ] ; then
echo "Are you sure you want to erase entire ${DEV}? [Y/N]" echo "Are you sure you want to erase entire \"${DEV}\"? [Y/N]"
read -r YESNO read -r YESNO
if [ "${YESNO}" != "Y" ] && [ "${YESNO}" != "y" ] ; then if [ "${YESNO}" != "Y" ] && [ "${YESNO}" != "y" ] ; then
cat <<-HEREDOC cat <<-HEREDOC
@ -84,6 +84,20 @@ function confirmation(){
fi # if YES fi # if YES
fi # if erase all fi # if erase all
# For sure ask to overwrite.
if [ "${OVERWRITEINSTALL}" -ne 0 ] ; then
echo "Are you sure you want to overwrite \"${LVROOTNAME}\" in \"${VGNAME}\"? [Y/N]"
read -r YESNO
if [ "${YESNO}" != "Y" ] && [ "${YESNO}" != "y" ] ; then
cat <<-HEREDOC
...Check your config.sh. The variable OVERWRITEINSTALL is ${OVERWRITEINSTALL}.
...Installation process terminated..
HEREDOC
return 1 # with error status
fi # if YES
fi # if overwrite
# ----- Set Passphrase ----- # ----- Set Passphrase -----
# Input passphrase # Input passphrase
echo "" echo ""