Skip to content

Commit 8c64b60

Browse files
committed
remove repo and zone prompt for all_in_one install
1 parent bbf10bd commit 8c64b60

1 file changed

Lines changed: 23 additions & 13 deletions

File tree

installer.sh

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -758,10 +758,14 @@ configure_cloudstack_repo() {
758758

759759
local repo_base_url=$(echo "$repo_entry" | sed -E 's|.*(https?://[^/ ]+).*|\1|')
760760
local gpg_url="${repo_base_url}/release.asc"
761-
if ! dialog --backtitle "$SCRIPT_NAME" \
762-
--title "Confirm Repository" \
763-
--yesno "The following CloudStack repository will be added:\n\n$repo_entry\n\nProceed?" 12 70; then
764-
error_exit "CloudStack repository configuration cancelled by user."
761+
if is_interactive; then
762+
if ! dialog --backtitle "$SCRIPT_NAME" \
763+
--title "Confirm Repository" \
764+
--yesno "The following CloudStack repository will be added:\n\n$repo_entry\n\nProceed?" 12 70; then
765+
error_exit "CloudStack repository configuration cancelled by user."
766+
fi
767+
else
768+
show_dialog "info" "$title" "The following CloudStack repository will be added:\n\n$repo_entry" 4
765769
fi
766770

767771
log "Configuring CS repo: $repo_entry"
@@ -992,11 +996,11 @@ configure_management_server_database() {
992996
cloudstack-setup-management 2>&1 | \
993997
while IFS= read -r line; do
994998
msg=$(echo "$line" | strip_ansi)
995-
update_progress_bar "75" "Deploying Management Server...\n\n$msg"
999+
update_progress_bar "75" "Starting Management Server...\n\n$msg"
9961000
done
9971001
} | dialog --backtitle "$SCRIPT_NAME" \
9981002
--title "Management Server Setup" \
999-
--gauge "Starting management server setup..." 10 70 0
1003+
--gauge "Starting management server setup..." 10 72 0
10001004

10011005
sleep 5
10021006
set_tracker_field "$tracker_key" "yes"
@@ -1825,10 +1829,14 @@ deploy_zone() {
18251829

18261830
log "Zone deployment details: $confirm_msg"
18271831

1828-
if ! dialog --backtitle "$SCRIPT_NAME" \
1829-
--title "Confirm Configuration" \
1830-
--yesno "$confirm_msg" 18 60; then
1831-
return 1
1832+
if is_interactive; then
1833+
if ! dialog --backtitle "$SCRIPT_NAME" \
1834+
--title "Confirm Configuration" \
1835+
--yesno "$confirm_msg" 18 60; then
1836+
return 1
1837+
fi
1838+
else
1839+
show_dialog "info" $title "Zone Configuration: \n$confirm_msg" 5 20 60
18321840
fi
18331841

18341842
if ! wait_for_management_server; then
@@ -1979,9 +1987,11 @@ configure_cloud_init() {
19791987
}
19801988

19811989
configure_network() {
1982-
local new_bridge=$(dialog --inputbox "Enter the name for the bridge:" 8 60 "$BRIDGE" 3>&1 1>&2 2>&3)
1983-
if [[ -n "$new_bridge" && "$new_bridge" =~ ^[a-zA-Z0-9_.-]{1,15}$ ]]; then
1984-
BRIDGE="$new_bridge"
1990+
if is_interactive; then
1991+
local new_bridge=$(dialog --inputbox "Enter the name for the bridge:" 8 60 "$BRIDGE" 3>&1 1>&2 2>&3)
1992+
if [[ -n "$new_bridge" && "$new_bridge" =~ ^[a-zA-Z0-9_.-]{1,15}$ ]]; then
1993+
BRIDGE="$new_bridge"
1994+
fi
19851995
fi
19861996

19871997
# First check if bridge already exists

0 commit comments

Comments
 (0)