m0duspwnens
2019-11-15 14:02:06 -05:00
parent ff4077a46f
commit 8261b6fc63

View File

@@ -4,7 +4,6 @@ import subprocess
def check():
os = __grains__['os']
cmd = 'needs-restarting -r > /dev/null 2>&1'
if os == 'Ubuntu':
if path.exists('/var/run/reboot-required'):
@@ -13,6 +12,7 @@ def check():
retval = 'False'
elif os == 'CentOS':
cmd = 'needs-restarting -r > /dev/null 2>&1'
try:
needs_restarting = subprocess.check_call(cmd.split(), shell=True)
except subprocess.CalledProcessError: