Check if systemd is running

This commit is contained in:
Anthony Rose 2021-12-07 10:53:34 +00:00
parent b53d4da471
commit 286f3b6f65

View file

@ -212,7 +212,7 @@ usermotd () {
fi
uptime
echo "LANG=$LANG"
if [ -x /usr/bin/timedatectl ]
if [ -x /usr/bin/timedatectl ] && [ "x$(systemctl is-system-running)" != "xoffline" ]
then
timedatectl show --property=Timezone | sed 's/Timezone=/TZ=/'
fi