Extra politeness on install

This commit is contained in:
Bob Mottram 2017-06-14 21:25:25 +01:00
parent 1286c030b0
commit a6dd4961b1
3 changed files with 19 additions and 4 deletions

View File

@ -109,6 +109,20 @@ if [ -f /usr/bin/${PROJECT_NAME} ]; then
PROJECT_INSTALL_DIR=/usr/bin
fi
function please_wait {
local str width height length
width=$(tput cols)
height=$(tput lines)
str=$"Please wait"
length=${#str}
clear
tput cup $((height / 2)) $(((width / 2) - (length / 2)))
echo "$str"
tput cup $((height * 3 / 5)) $(((width / 2)))
echo -n ''
}
source $PROJECT_INSTALL_DIR/${PROJECT_NAME}-vars
UTILS_FILES=/usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-*
@ -608,7 +622,7 @@ function choose_username {
if [ ${#possible_username} -gt 1 ]; then
if [[ $possible_username != $GENERIC_IMAGE_USERNAME ]]; then
MY_USERNAME=$(cat $data)
clear
please_wait
echo $'Creating user account'
chmod 600 /etc/shadow
chmod 600 /etc/gshadow
@ -693,7 +707,7 @@ function choose_full_name {
esac
done
save_configuration_values
clear
please_wait
}
function choose_system_variant {
@ -971,7 +985,7 @@ function interactive_select_language {
esac
save_configuration_values
clear
please_wait
echo 'Setting locale'
locale-gen "${DEFAULT_LANGUAGE}"

View File

@ -38,7 +38,7 @@ function please_wait {
width=$(tput cols)
height=$(tput lines)
str="Please wait"
str=$"Please wait"
length=${#str}
clear
tput cup $((height / 2)) $(((width / 2) - (length / 2)))

View File

@ -235,6 +235,7 @@ function interactive_key_recovery {
1) return;;
255) return;;
esac
clear
apt-get -yq install cryptsetup
${PROJECT_NAME}-recoverkey -u $MY_USERNAME
if [ -d /home/$MY_USERNAME/.gnupg ]; then