From c6e37cdef37e2276207b34a42919f1e0ac4a04dc Mon Sep 17 00:00:00 2001 From: Michael Nguyen Date: Fri, 9 Aug 2019 10:24:08 -0400 Subject: [PATCH] profile.d: Tighten the Silverblue check 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 --- profile.d/toolbox.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/profile.d/toolbox.sh b/profile.d/toolbox.sh index 622c2fd..8ca2bf8 100644 --- a/profile.d/toolbox.sh +++ b/profile.d/toolbox.sh @@ -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"