浏览代码

Do interactive app configuration before installing base system

Bob Mottram 8 年前
父节点
当前提交
6debd6b5f5
共有 2 个文件被更改,包括 26 次插入21 次删除
  1. 1
    0
      src/freedombone-config
  2. 25
    21
      src/freedombone-utils-selector

+ 1
- 0
src/freedombone-config 查看文件

1345
     choose_static_ip
1345
     choose_static_ip
1346
     choose_default_domain_name
1346
     choose_default_domain_name
1347
     choose_email_address
1347
     choose_email_address
1348
+    install_apps_interactive
1348
 
1349
 
1349
     # delete the temporary configuration file
1350
     # delete the temporary configuration file
1350
     if [ -f temp.cfg ]; then
1351
     if [ -f temp.cfg ]; then

+ 25
- 21
src/freedombone-utils-selector 查看文件

402
     update_installed_apps_list
402
     update_installed_apps_list
403
 }
403
 }
404
 
404
 
405
+function install_apps_interactive {
406
+    echo $"Interactive installer"
407
+    app_index=0
408
+    for a in "${APPS_AVAILABLE[@]}"
409
+    do
410
+        echo -n "${a}"
411
+        if [[ ${APPS_INSTALLED[$app_index]} == "0" ]]; then
412
+            echo -n $" not installed"
413
+            if [[ ${APPS_CHOSEN[$app_index]} == "1" ]]; then
414
+                echo -n $" chosen"
415
+                # interactively obtain settings for this app
416
+                if [[ $(function_exists install_interactive_${a}) == "1" ]]; then
417
+                    echo -n $" interactive"
418
+                    install_interactive_${a}
419
+                fi
420
+            fi
421
+        fi
422
+        echo ""
423
+
424
+        app_index=$[app_index+1]
425
+    done
426
+    echo $"Interactive settings complete"
427
+}
428
+
405
 function install_apps {
429
 function install_apps {
406
     is_interactive=$1
430
     is_interactive=$1
407
 
431
 
408
     # interactive install configuration for each app
432
     # interactive install configuration for each app
409
     if [ ${is_interactive} ]; then
433
     if [ ${is_interactive} ]; then
410
-        echo $"Interactive installer"
411
-        app_index=0
412
-        for a in "${APPS_AVAILABLE[@]}"
413
-        do
414
-            echo -n "${a}"
415
-            if [[ ${APPS_INSTALLED[$app_index]} == "0" ]]; then
416
-                echo -n $" not installed"
417
-                if [[ ${APPS_CHOSEN[$app_index]} == "1" ]]; then
418
-                    echo -n $" chosen"
419
-                    # interactively obtain settings for this app
420
-                    if [[ $(function_exists install_interactive_${a}) == "1" ]]; then
421
-                        echo -n $" interactive"
422
-                        install_interactive_${a}
423
-                    fi
424
-                fi
425
-            fi
426
-            echo ""
427
-
428
-            app_index=$[app_index+1]
429
-        done
430
-        echo $"Interactive settings complete"
434
+        install_apps_interactive
431
     fi
435
     fi
432
 
436
 
433
     # now install the apps
437
     # now install the apps