|
@@ -260,7 +260,10 @@ EOF
|
260
|
260
|
echo ' else' >> $rootdir/root/.bashrc
|
261
|
261
|
echo ' ENTROPY=$(cat /proc/sys/kernel/random/entropy_avail)' >> $rootdir/root/.bashrc
|
262
|
262
|
echo ' if [ $ENTROPY -lt 500 ]; then' >> $rootdir/root/.bashrc
|
263
|
|
- echo ' dialog --backtitle "Initial setup process" --title "Password Generation" --msgbox "WARNING: The entropy available on this system is too low to generate a password.\n\nThe installation process cannot continue." 8 50' >> $rootdir/root/.bashrc
|
|
263
|
+ ENTROPY_MESSAGE1=$'Initial setup process'
|
|
264
|
+ ENTROPY_MESSAGE2=$'Password Generation'
|
|
265
|
+ ENTROPY_MESSAGE3=$'WARNING: The entropy available on this system is too low to generate a password.\n\nThe installation process cannot continue.'
|
|
266
|
+ echo " dialog --backtitle \"${ENTROPY_MESSAGE1}\" --title \"${ENTROPY_MESSAGE2}\" --msgbox \"${ENTROPY_MESSAGE3}\" 8 50" >> $rootdir/root/.bashrc
|
264
|
267
|
echo ' exit' >> $rootdir/root/.bashrc
|
265
|
268
|
echo ' fi' >> $rootdir/root/.bashrc
|
266
|
269
|
echo ' NEW_USER_PASSWORD="$(openssl rand -base64 12 | cut -c1-10)"' >> $rootdir/root/.bashrc
|
|
@@ -269,18 +272,21 @@ EOF
|
269
|
272
|
|
270
|
273
|
echo ' clear' >> $rootdir/root/.bashrc
|
271
|
274
|
echo ' echo ""' >> $rootdir/root/.bashrc
|
272
|
|
- echo ' echo "Your new login password is:"' >> $rootdir/root/.bashrc
|
|
275
|
+ NEW_LOGIN_PASSWORD_MESSAGE1=$'Your new login password is:'
|
|
276
|
+ NEW_LOGIN_PASSWORD_MESSAGE2=$'Use it whenever you wish to ssh into this system.'
|
|
277
|
+ NEW_LOGIN_PASSWORD_MESSAGE3=$'IMPORTANT: Please take a moment to enter the above password into a\npassword manager or write it down somewhere.'
|
|
278
|
+ PRESS_KEY_MESSAGE=$'Press any key to continue...'
|
|
279
|
+ echo " echo \"${NEW_LOGIN_PASSWORD_MESSAGE1}\"" >> $rootdir/root/.bashrc
|
273
|
280
|
echo ' echo ""' >> $rootdir/root/.bashrc
|
274
|
281
|
echo ' toilet "${NEW_USER_PASSWORD}"' >> $rootdir/root/.bashrc
|
275
|
282
|
echo ' echo ""' >> $rootdir/root/.bashrc
|
276
|
283
|
echo ' echo " ${NEW_USER_PASSWORD}"' >> $rootdir/root/.bashrc
|
277
|
284
|
echo ' echo ""' >> $rootdir/root/.bashrc
|
278
|
|
- echo ' echo "Use it whenever you wish to ssh into this system."' >> $rootdir/root/.bashrc
|
|
285
|
+ echo " echo \"${NEW_LOGIN_PASSWORD_MESSAGE2}\"" >> $rootdir/root/.bashrc
|
279
|
286
|
echo ' echo ""' >> $rootdir/root/.bashrc
|
280
|
|
- echo ' echo "IMPORTANT: Please take a moment to enter the above password into a"' >> $rootdir/root/.bashrc
|
281
|
|
- echo ' echo "password manager or write it down somewhere."' >> $rootdir/root/.bashrc
|
|
287
|
+ echo " echo \"${NEW_LOGIN_PASSWORD_MESSAGE3}\"" >> $rootdir/root/.bashrc
|
282
|
288
|
echo ' echo ""' >> $rootdir/root/.bashrc
|
283
|
|
- echo ' read -n1 -r -p "Press any key to continue..." key' >> $rootdir/root/.bashrc
|
|
289
|
+ echo " read -n1 -r -p \"${PRESS_KEY_MESSAGE}\" key" >> $rootdir/root/.bashrc
|
284
|
290
|
|
285
|
291
|
# change the password for the admin user
|
286
|
292
|
echo -n " echo \"${MY_USERNAME}:" >> $rootdir/root/.bashrc
|
|
@@ -325,7 +331,8 @@ EOF
|
325
|
331
|
echo ' else' >> $rootdir/root/.bashrc
|
326
|
332
|
echo ' key=' >> $rootdir/root/.bashrc
|
327
|
333
|
echo ' while [[ $key != "x" ]]; do' >> $rootdir/root/.bashrc
|
328
|
|
- echo ' read -n1 -r -p "Press x to continue..." key' >> $rootdir/root/.bashrc
|
|
334
|
+ INSTALL_FAIL_MESSAGE=$"Install failed. Press x to continue..."
|
|
335
|
+ echo " read -n1 -r -p \"${INSTALL_FAIL_MESSAGE}\" key" >> $rootdir/root/.bashrc
|
329
|
336
|
echo ' done' >> $rootdir/root/.bashrc
|
330
|
337
|
echo ' fi' >> $rootdir/root/.bashrc
|
331
|
338
|
echo ' exit' >> $rootdir/root/.bashrc
|