diff --git a/.update/version b/.update/version index fd2aacfc48..0e2d288fb4 100644 --- a/.update/version +++ b/.update/version @@ -3,7 +3,7 @@ # Available DietPi version G_REMOTE_VERSION_CORE=8 G_REMOTE_VERSION_SUB=22 -G_REMOTE_VERSION_RC=2 +G_REMOTE_VERSION_RC=3 # Minimum DietPi version to allow update G_MIN_VERSION_CORE=6 G_MIN_VERSION_SUB=14 diff --git a/dietpi/func/dietpi-globals b/dietpi/func/dietpi-globals index 1495b26f42..f3b5d4d082 100644 --- a/dietpi/func/dietpi-globals +++ b/dietpi/func/dietpi-globals @@ -30,17 +30,13 @@ #[[ $G_DEBUG == [01] ] || G_DEBUG=0 # Non-interactive mode - # - Set G_INTERACTIVE=0 to disable interactive G_EXEC and G_WHIP dialogues + # - Set G_INTERACTIVE=0 to skip interactive G_EXEC and G_WHIP dialogues # - Set G_INTERACTIVE=1 to force interactive G_EXEC and G_WHIP dialogues - # - Default is based on whether STDIN is attached to an open terminal or not: [[ -t 0 ]] - # OK | systemd = [[ -t 0 ]] is false - # OK | Cron = [[ -t 0 ]] is false - # NB | /etc/profile, ~/.profile, /etc/profile.d/, /etc/bash.bashrc, ~/.bashrc and /etc/bashrc.d/ are usually interactive since those are sourced from originating shell/bash session. - if [[ $G_INTERACTIVE != [01] ]]; then - - [[ -t 0 ]] && G_INTERACTIVE=1 || G_INTERACTIVE=0 - - fi + # - Default is based on whether STDIN is attached to a terminal: [[ -t 0 ]] + # cron jobs run non-interactively. + # systemd services run non-interactively unless StardardInput is explicitly set to a terminal. + # /etc/profile, /etc/profile.d/*, ~/.profile, /etc/bash.bashrc, /etc/bashrc.d/* and ~/.bashrc usually run interactively as those are sourced from the originating shell session. "profile" is sourced from login shells only, bashrc from all interactive bash shells. + [[ $G_INTERACTIVE == [01] ]] || { [[ -t 0 ]] && G_INTERACTIVE=1 || G_INTERACTIVE=0; } # Disable DietPi-Services # - Set G_DIETPI_SERVICES_DISABLE=1 to disable DietPi-Services @@ -59,7 +55,7 @@ # - Assign defaults/code version as fallback [[ $G_DIETPI_VERSION_CORE ]] || G_DIETPI_VERSION_CORE=8 [[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=22 - [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=2 + [[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=3 [[ $G_GITBRANCH ]] || G_GITBRANCH='master' [[ $G_GITOWNER ]] || G_GITOWNER='MichaIng' # - Save current version and Git branch