From 92449c24828b0dbd582637ce3d1d705390da4126 Mon Sep 17 00:00:00 2001 From: Vanessa Rene Valderrama Date: Thu, 13 May 2021 12:22:28 -0500 Subject: [PATCH] Feat: Add support for Ubuntu 20.04 and Docker Updating the sysstat script to support Ubuntu 20.04 and Docker systems Signed-off-by: Vanessa Rene Valderrama Change-Id: I12e6daa8a04228337c99b004e67338eb8f6a8f1a --- releasenotes/notes/update_sysstat-41a5a72b1fdd1861.yaml | 5 +++++ shell/sysstat.sh | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/update_sysstat-41a5a72b1fdd1861.yaml diff --git a/releasenotes/notes/update_sysstat-41a5a72b1fdd1861.yaml b/releasenotes/notes/update_sysstat-41a5a72b1fdd1861.yaml new file mode 100644 index 00000000..a35ed621 --- /dev/null +++ b/releasenotes/notes/update_sysstat-41a5a72b1fdd1861.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Update to the sysstat script to add support for + operating system Ubuntu 20.04 and Docker systems diff --git a/shell/sysstat.sh b/shell/sysstat.sh index bbc502c6..eada1b35 100644 --- a/shell/sysstat.sh +++ b/shell/sysstat.sh @@ -11,12 +11,17 @@ echo "---> sysstat.sh" set +e # DON'T fail build if script fails. +if awk -F/ '$2 == "docker"' /proc/self/cgroup | read -r; then + exit 0 +fi + + OS=$(facter operatingsystem) case "$OS" in Ubuntu) os_release=$(facter operatingsystemrelease) case $os_release in - 16.04|18.04) + 16.04|18.04|20.04) if ! systemctl status sysstat > /dev/null; then exit 0 fi -- 2.16.6