Przeglądaj źródła

Extra politeness on install

Bob Mottram 8 lat temu
rodzic
commit
a6dd4961b1

+ 17
- 3
src/freedombone-config Wyświetl plik

109
     PROJECT_INSTALL_DIR=/usr/bin
109
     PROJECT_INSTALL_DIR=/usr/bin
110
 fi
110
 fi
111
 
111
 
112
+function please_wait {
113
+        local str width height length
114
+
115
+        width=$(tput cols)
116
+        height=$(tput lines)
117
+        str=$"Please wait"
118
+        length=${#str}
119
+        clear
120
+        tput cup $((height / 2)) $(((width / 2) - (length / 2)))
121
+        echo "$str"
122
+        tput cup $((height * 3 / 5)) $(((width / 2)))
123
+        echo -n ''
124
+}
125
+
112
 source $PROJECT_INSTALL_DIR/${PROJECT_NAME}-vars
126
 source $PROJECT_INSTALL_DIR/${PROJECT_NAME}-vars
113
 
127
 
114
 UTILS_FILES=/usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-*
128
 UTILS_FILES=/usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-*
608
                            if [ ${#possible_username} -gt 1 ]; then
622
                            if [ ${#possible_username} -gt 1 ]; then
609
                                if [[ $possible_username != $GENERIC_IMAGE_USERNAME ]]; then
623
                                if [[ $possible_username != $GENERIC_IMAGE_USERNAME ]]; then
610
                                    MY_USERNAME=$(cat $data)
624
                                    MY_USERNAME=$(cat $data)
611
-                                   clear
625
+                                   please_wait
612
                                    echo $'Creating user account'
626
                                    echo $'Creating user account'
613
                                    chmod 600 /etc/shadow
627
                                    chmod 600 /etc/shadow
614
                                    chmod 600 /etc/gshadow
628
                                    chmod 600 /etc/gshadow
693
         esac
707
         esac
694
     done
708
     done
695
     save_configuration_values
709
     save_configuration_values
696
-    clear
710
+    please_wait
697
 }
711
 }
698
 
712
 
699
 function choose_system_variant {
713
 function choose_system_variant {
971
     esac
985
     esac
972
     save_configuration_values
986
     save_configuration_values
973
 
987
 
974
-    clear
988
+    please_wait
975
     echo 'Setting locale'
989
     echo 'Setting locale'
976
 
990
 
977
     locale-gen "${DEFAULT_LANGUAGE}"
991
     locale-gen "${DEFAULT_LANGUAGE}"

+ 1
- 1
src/freedombone-controlpanel Wyświetl plik

38
 
38
 
39
         width=$(tput cols)
39
         width=$(tput cols)
40
         height=$(tput lines)
40
         height=$(tput lines)
41
-        str="Please wait"
41
+        str=$"Please wait"
42
         length=${#str}
42
         length=${#str}
43
         clear
43
         clear
44
         tput cup $((height / 2)) $(((width / 2) - (length / 2)))
44
         tput cup $((height / 2)) $(((width / 2) - (length / 2)))

+ 1
- 0
src/freedombone-utils-keys Wyświetl plik

235
         1) return;;
235
         1) return;;
236
         255) return;;
236
         255) return;;
237
     esac
237
     esac
238
+    clear
238
     apt-get -yq install cryptsetup
239
     apt-get -yq install cryptsetup
239
     ${PROJECT_NAME}-recoverkey -u $MY_USERNAME
240
     ${PROJECT_NAME}-recoverkey -u $MY_USERNAME
240
     if [ -d /home/$MY_USERNAME/.gnupg ]; then
241
     if [ -d /home/$MY_USERNAME/.gnupg ]; then