Skip to content

Commit

Permalink
profile.d: Tighten the Silverblue check
Browse files Browse the repository at this point in the history
The Silverblue welcome message was being displayed incorrectly on
other OSTree based OS's (Fedora Atomic Host, Fedora CoreOS, etc).

Note that none of the stable Silverblue releases that have shipped so
far (ie., until Silverblue 30) have had 'silverblue' as the VARIANT_ID.
This makes the check a bit more convoluted that it should have been.

https://github.com/debarshiray/toolbox/pull/236
  • Loading branch information
mike-nguyen authored and debarshiray committed Aug 12, 2019
1 parent 0dee71b commit c6e37cd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion profile.d/toolbox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@ toolbox_config="$HOME/.config/toolbox"
host_welcome_stub="$toolbox_config/host-welcome-shown"
toolbox_welcome_stub="$toolbox_config/toolbox-welcome-shown"

# shellcheck disable=SC1091
. /usr/lib/os-release

if [ -f /run/ostree-booted ] \
&& ! [ -f "$host_welcome_stub" ]; then
&& ! [ -f "$host_welcome_stub" ] \
&& [ "${ID}" = "fedora" ] \
&& { [ "${VARIANT_ID}" = "workstation" ] || [ "${VARIANT_ID}" = "silverblue" ]; }; then
echo ""
echo "Welcome to Fedora Silverblue. This terminal is running on the"
echo "host system. You may want to try out the Toolbox for a directly"
Expand Down

0 comments on commit c6e37cd

Please sign in to comment.