Compare commits

...

1 Commits

Author SHA1 Message Date
MickLesk a5e2a50cd6 Keep host tools running when clear does not know the terminal
clear exits 1 for a TERM the host has no terminfo entry for, such as
xterm-ghostty or xterm-kitty over SSH, and when TERM is unset under cron.
The tools that run under errexit died on it in header_info within a
second, before showing anything, which telemetry counts as
"exit_code=1 | General error" with no step for update-lxcs, update-repo,
fstrim, clean-lxcs, execute and storage-share-helper.

Fall back to the escape sequence the engine's _cs_clear uses.
2026-11-03 10:21:18 +01:00
17 changed files with 26 additions and 26 deletions
+1 -1
View File
@@ -5,7 +5,7 @@
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
function header_info() {
clear
clear 2>/dev/null || printf '\033[H\033[2J\033[3J'
cat <<"EOF"
________ __ _ ________
/ ____/ /__ ____ _____ / / | |/ / ____/
+1 -1
View File
@@ -19,7 +19,7 @@ CONF_FILE="/etc/update-lxcs.conf"
LOG_FILE="/var/log/update-lxcs-cron.log"
CRON_ENTRY="0 0 * * 0 ${LOCAL_SCRIPT} >>${LOG_FILE} 2>&1"
clear
clear 2>/dev/null || printf '\033[H\033[2J\033[3J'
cat <<"EOF"
______ __ __ __ __ __ _ ________
/ ____/________ ____ / / / /___ ____/ /___ _/ /____ / / | |/ / ____/____
+1 -1
View File
@@ -6,7 +6,7 @@
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
function header_info() {
clear
clear 2>/dev/null || printf '\033[H\033[2J\033[3J'
cat <<"EOF"
______ __ __ _ ________
/ ____/ _____ _______ __/ /____ / / | |/ / ____/
+1 -1
View File
@@ -3,7 +3,7 @@
set -eEuo pipefail
function header_info() {
clear
clear 2>/dev/null || printf '\033[H\033[2J\033[3J'
cat <<"EOF"
_______ __ __ ______ _
/ ____(_) /__ _______ _______/ /____ ____ ___ /_ __/____(_)___ ___
+1 -1
View File
@@ -5,7 +5,7 @@
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
function header_info {
clear
clear 2>/dev/null || printf '\033[H\033[2J\033[3J'
cat <<"EOF"
____ ______ __ ____ __ __
/ __ \_________ _ ______ ___ ____ _ __ / ____/_ _____ _____/ /_ / __ \___ / /__ / /____
+1 -1
View File
@@ -9,7 +9,7 @@
set -e
function header_info {
clear
clear 2>/dev/null || printf '\033[H\033[2J\033[3J'
cat <<"EOF"
__ ___ __ ___ __ __ _
+2 -2
View File
@@ -6,7 +6,7 @@
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
header_info() {
clear
clear 2>/dev/null || printf '\033[H\033[2J\033[3J'
cat <<"EOF"
____ ____ __________ __ ______ __________ ___ ____ ______
/ __ \/ __ ) ___/__ / / / / / __ \/ ____/ __ \/ | / __ \/ ____/
@@ -168,7 +168,7 @@ while true; do
case $yn in
[Yy]*) break ;;
[Nn]*)
clear
clear 2>/dev/null || printf '\033[H\033[2J\033[3J'
exit
;;
*) echo "Please answer yes or no." ;;
+2 -2
View File
@@ -5,7 +5,7 @@
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
header_info() {
clear
clear 2>/dev/null || printf '\033[H\033[2J\033[3J'
cat <<"EOF"
____ ____ _____ __ __ __ __ __
/ __ \/ __ ) ___// // / / / / /___ ____ __________ _____/ /__
@@ -192,7 +192,7 @@ while true; do
case $yn in
[Yy]*) break ;;
[Nn]*)
clear
clear 2>/dev/null || printf '\033[H\033[2J\033[3J'
exit
;;
*) echo "Please answer yes or no." ;;
+2 -2
View File
@@ -5,7 +5,7 @@
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
header_info() {
clear
clear 2>/dev/null || printf '\033[H\033[2J\033[3J'
cat <<"EOF"
____ ____ _____ ____ __ ____ __ ____
/ __ \/ __ ) ___/ / __ \____ _____/ /_ / _/___ _____/ /_____ _/ / /
@@ -89,7 +89,7 @@ main() {
case $yn in
[Yy]*) break ;;
[Nn]*)
clear
clear 2>/dev/null || printf '\033[H\033[2J\033[3J'
exit
;;
*) echo "Please answer yes or no." ;;
+2 -2
View File
@@ -5,7 +5,7 @@
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
header_info() {
clear
clear 2>/dev/null || printf '\033[H\033[2J\033[3J'
cat <<"EOF"
____ ____ __ ___ ____ __ ____ __ ____
/ __ \/ __ \/ |/ / / __ \____ _____/ /_ / _/___ _____/ /_____ _/ / /
@@ -412,7 +412,7 @@ while true; do
case $yn in
[Yy]*) break ;;
[Nn]*)
clear
clear 2>/dev/null || printf '\033[H\033[2J\033[3J'
exit
;;
*) echo "Please answer yes or no." ;;
+2 -2
View File
@@ -5,7 +5,7 @@
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
header_info() {
clear
clear 2>/dev/null || printf '\033[H\033[2J\033[3J'
cat <<"EOF"
____ __ _________ ____ __ ____ __ ____
/ __ \/ |/ / ____/ / __ \____ _____/ /_ / _/___ _____/ /_____ _/ / /
@@ -410,7 +410,7 @@ while true; do
case $yn in
[Yy]*) break ;;
[Nn]*)
clear
clear 2>/dev/null || printf '\033[H\033[2J\033[3J'
exit
;;
*) echo "Please answer yes or no." ;;
+2 -2
View File
@@ -6,7 +6,7 @@
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
header_info() {
clear
clear 2>/dev/null || printf '\033[H\033[2J\033[3J'
cat <<"EOF"
____ _ ________ ____ __ ____ __ ____
/ __ \ | / / ____/ / __ \____ _____/ /_ / _/___ _____/ /_____ _/ / /
@@ -81,7 +81,7 @@ main() {
case $yn in
[Yy]*) break ;;
[Nn]*)
clear
clear 2>/dev/null || printf '\033[H\033[2J\033[3J'
exit
;;
*) echo "Please answer yes or no." ;;
+2 -2
View File
@@ -6,7 +6,7 @@
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
header_info() {
clear
clear 2>/dev/null || printf '\033[H\033[2J\033[3J'
cat <<"EOF"
____ _ ____________ __ ______ __________ ___ ____ ______
/ __ \ | / / ____( __ ) / / / / __ \/ ____/ __ \/ | / __ \/ ____/
@@ -118,7 +118,7 @@ while true; do
case $yn in
[Yy]*) break ;;
[Nn]*)
clear
clear 2>/dev/null || printf '\033[H\033[2J\033[3J'
exit
;;
*) echo "Please answer yes or no." ;;
+3 -3
View File
@@ -11,7 +11,7 @@ source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent
declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "scaling-governor" "pve"
header_info() {
clear
clear 2>/dev/null || printf '\033[H\033[2J\033[3J'
cat <<EOF
________ __ __ _____
/ ___/ _ \/ / / / / ___/__ _ _____ _______ ___ _______
@@ -26,7 +26,7 @@ GOV_BASE="/sys/devices/system/cpu/cpu0/cpufreq"
if [[ ! -r "$GOV_BASE/scaling_governor" || ! -r "$GOV_BASE/scaling_available_governors" ]]; then
whiptail --backtitle "Proxmox VE Helper Scripts" --title "CPU Scaling Not Available" \
--msgbox "CPU frequency scaling is not available on this system.\n\nThis is normal when no cpufreq driver is active (e.g. CPU power management handled by the BIOS, or certain virtualized hosts)." 12 70
clear
clear 2>/dev/null || printf '\033[H\033[2J\033[3J'
exit 0
fi
@@ -42,7 +42,7 @@ done < <(tr ' ' '\n' <"$GOV_BASE/scaling_available_governors" | sed '/^$/d' | gr
scaling_governor=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Current CPU Scaling Governor is set to $current_governor" --radiolist "\nSelect the Scaling Governor to use:\n" 16 $((MSG_MAX_LENGTH + 58)) 6 "${GOVERNORS_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"')
[ -z "$scaling_governor" ] && {
whiptail --backtitle "Proxmox VE Helper Scripts" --title "No CPU Scaling Governor Selected" --msgbox "It appears that no CPU Scaling Governor was selected" 10 68
clear
clear 2>/dev/null || printf '\033[H\033[2J\033[3J'
exit
}
echo "${scaling_governor}" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor >/dev/null
+1 -1
View File
@@ -11,7 +11,7 @@ declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "storage-share
set -eEuo pipefail
function header_info() {
clear
clear 2>/dev/null || printf '\033[H\033[2J\033[3J'
cat <<"EOF"
_____ __ ___ _________
/ ___// /_____ _________ _____ ____ / | / _/ __ \
+1 -1
View File
@@ -6,7 +6,7 @@
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
function header_info() {
clear
clear 2>/dev/null || printf '\033[H\033[2J\033[3J'
cat <<"EOF"
__ __ __ __ __ _ ________
/ / / /___ ____/ /___ _/ /____ / / | |/ / ____/
+1 -1
View File
@@ -6,7 +6,7 @@
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
function header_info {
clear
clear 2>/dev/null || printf '\033[H\033[2J\033[3J'
cat <<"EOF"
__ __ __ __ ____
/ / / /___ ____/ /___ _/ /____ / __ \___ ____ ____