From 707811cc4a439b93c81e577624105bc97b8c3eca Mon Sep 17 00:00:00 2001 From: MacRimi Date: Wed, 9 Jul 2025 18:59:26 +0200 Subject: [PATCH] update script coral TPU --- scripts/configure_igpu_lxc.sh | 6 ++++-- scripts/install_coral_lxc.sh | 9 +++++++-- scripts/install_coral_pve.sh | 12 ++++++++---- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/scripts/configure_igpu_lxc.sh b/scripts/configure_igpu_lxc.sh index b7baae3..f9d3ae3 100644 --- a/scripts/configure_igpu_lxc.sh +++ b/scripts/configure_igpu_lxc.sh @@ -42,7 +42,7 @@ select_container() { fi CONTAINER_ID=$(whiptail --title "$(translate 'Select Container')" \ - --menu "$(translate 'Select the LXC container:')" 15 60 8 $CONTAINERS 3>&1 1>&2 2>&3) + --menu "$(translate 'Select the LXC container:')" 20 70 10 $CONTAINERS 3>&1 1>&2 2>&3) if [ -z "$CONTAINER_ID" ]; then msg_error "$(translate 'No container selected. Exiting.')" @@ -172,4 +172,6 @@ install_igpu_in_container msg_success "$(translate 'iGPU configuration completed in container') $CONTAINER_ID." -sleep 2 +echo -e +msg_success "$(translate "Press Enter to return to menu...")" +read -r diff --git a/scripts/install_coral_lxc.sh b/scripts/install_coral_lxc.sh index 2142124..200a2c4 100644 --- a/scripts/install_coral_lxc.sh +++ b/scripts/install_coral_lxc.sh @@ -44,7 +44,7 @@ select_container() { fi CONTAINER_ID=$(whiptail --title "$(translate 'Select Container')" \ - --menu "$(translate 'Select the LXC container:')" 15 60 5 $CONTAINERS 3>&1 1>&2 2>&3) + --menu "$(translate 'Select the LXC container:')" 20 70 10 $CONTAINERS 3>&1 1>&2 2>&3) if [ -z "$CONTAINER_ID" ]; then msg_error "$(translate 'No container selected. Exiting.')" @@ -120,6 +120,9 @@ configure_lxc_hardware() { else msg_ok "$(translate 'The container is already privileged.')" fi + + + sed -i '/^dev[0-9]\+:/d' "$CONFIG_FILE" # Enable nesting feature if ! grep -q "features: nesting=1" "$CONFIG_FILE"; then @@ -232,4 +235,6 @@ configure_lxc_hardware install_coral_in_container msg_ok "$(translate 'Configuration completed.')" -sleep 2 +echo -e +msg_success "$(translate "Press Enter to return to menu...")" +read -r diff --git a/scripts/install_coral_pve.sh b/scripts/install_coral_pve.sh index 3e31a9a..812d911 100644 --- a/scripts/install_coral_pve.sh +++ b/scripts/install_coral_pve.sh @@ -94,19 +94,23 @@ install_coral_host() { exit 1 fi - msg_ok "$(translate 'Coral TPU drivers installed successfully on the host.')" + msg_success "$(translate 'Coral TPU drivers installed successfully on the host.')" + echo -e } # Prompt for reboot after installation -restart_prompt() { + restart_prompt() { if whiptail --title "$(translate 'Coral TPU Installation')" --yesno "$(translate 'The installation requires a server restart to apply changes. Do you want to restart now?')" 10 70; then - #echo -ne "\r${TAB}${YW}-$(translate 'Restarting the server...') ${CL}" msg_warn "$(translate 'Restarting the server...')" reboot + else + echo -e + msg_success "$(translate "Press Enter to return to menu...")" + read -r fi } -# Main logic + pre_install_prompt install_coral_host restart_prompt