diff --git a/salt/_modules/needs_restarting.py b/salt/_modules/needs_restarting.py index c2f7e8b12..edede9ad3 100644 --- a/salt/_modules/needs_restarting.py +++ b/salt/_modules/needs_restarting.py @@ -3,22 +3,14 @@ import subprocess def check(): - os = __grains__['os'] + osfam = __grains__['os_family'] retval = 'False' - if os == 'Ubuntu': + if osfam == 'Debian': if path.exists('/var/run/reboot-required'): retval = 'True' - elif os == 'CentOS Stream': - cmd = 'needs-restarting -r > /dev/null 2>&1' - - try: - needs_restarting = subprocess.check_call(cmd, shell=True) - except subprocess.CalledProcessError: - retval = 'True' - - elif os == 'Rocky': + elif osfam == 'RedHat': cmd = 'needs-restarting -r > /dev/null 2>&1' try: diff --git a/salt/repo/client/map.jinja b/salt/repo/client/map.jinja index b31fca2d2..94228c300 100644 --- a/salt/repo/client/map.jinja +++ b/salt/repo/client/map.jinja @@ -1,6 +1,6 @@ {% from 'vars/globals.map.jinja' import GLOBALS %} -{% if GLOBALS.os_family == 'Redhat' %} +{% if GLOBALS.os_family == 'RedHat' %} {% set REPOPATH = '/etc/yum.repos.d/' %} {% if GLOBALS.os == 'OEL' %} {% set ABSENTFILES = [