X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fsysstat.sh;h=eada1b35994b9181a21a98284ae30fd96430ae6f;hb=refs%2Fchanges%2F50%2F72650%2F2;hp=e071ad1a68545c5d41f05966afc3105f11099833;hpb=40d61a6fd4fdc64240fc298e039d9f88215e5e40;p=releng%2Fglobal-jjb.git diff --git a/shell/sysstat.sh b/shell/sysstat.sh index e071ad1a..eada1b35 100644 --- a/shell/sysstat.sh +++ b/shell/sysstat.sh @@ -11,19 +11,24 @@ 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 ;; 14.04) - if [[ ! -f /etc/default/sysstat ]] || - ! grep --quiet 'ENABLED="true"' /etc/default/sysstat; then + if [[ ! -f /etc/default/sysstat ]] || \ + ! grep --quiet 'ENABLED="true"' /etc/default/sysstat; then exit 0 fi ;;