Comment 18 for bug 1893716

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Collecting snippets:

This one worked, proven by eliminating lsb_release on the consumption charts.

#1 Caching for 91-release-upgrade:

--- orig/91-release-upgrade 2022-03-30 07:53:26.560515795 +0000
+++ /etc/update-motd.d/91-release-upgrade 2022-03-30 07:59:05.819971148 +0000
@@ -1,7 +1,12 @@
 #!/bin/sh

 # if the current release is under development there won't be a new one
-if [ "$(lsb_release -sd | cut -d' ' -f4)" = "(development" ]; then
+[ -r /etc/lsb-release ] && . /etc/lsb-release
+if [ -z "$DISTRIB_DESCRIPTION" ] && [ -x /usr/bin/lsb_release ]; then
+ DISTRIB_DESCRIPTION=$(lsb_release -s -d)
+fi
+
+if [ "$(echo "$DISTRIB_DESCRIPTION" | cut -d' ' -f4)" = "(development" ]; then
     exit 0
 fi