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
This commit is contained in:
parent
0dee71b13f
commit
c6e37cdef3
1 changed files with 6 additions and 1 deletions
|
@ -5,8 +5,13 @@ toolbox_config="$HOME/.config/toolbox"
|
||||||
host_welcome_stub="$toolbox_config/host-welcome-shown"
|
host_welcome_stub="$toolbox_config/host-welcome-shown"
|
||||||
toolbox_welcome_stub="$toolbox_config/toolbox-welcome-shown"
|
toolbox_welcome_stub="$toolbox_config/toolbox-welcome-shown"
|
||||||
|
|
||||||
|
# shellcheck disable=SC1091
|
||||||
|
. /usr/lib/os-release
|
||||||
|
|
||||||
if [ -f /run/ostree-booted ] \
|
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 ""
|
||||||
echo "Welcome to Fedora Silverblue. This terminal is running on the"
|
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"
|
echo "host system. You may want to try out the Toolbox for a directly"
|
||||||
|
|
Loading…
Reference in a new issue