Skip to content

Commit

Permalink
v8.22
Browse files Browse the repository at this point in the history
- RC up
- DietPi-Globals | Minor G_INTERACTIVE description and code update
  • Loading branch information
MichaIng committed Sep 23, 2023
1 parent 63fa8e2 commit c5e0251
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .update/version
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 7 additions & 11 deletions dietpi/func/dietpi-globals
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit c5e0251

Please sign in to comment.