mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-07 01:32:47 +01:00
move cmd assignment - https://github.com/Security-Onion-Solutions/securityonion-saltstack/issues/112
This commit is contained in:
@@ -4,7 +4,6 @@ import subprocess
|
|||||||
def check():
|
def check():
|
||||||
|
|
||||||
os = __grains__['os']
|
os = __grains__['os']
|
||||||
cmd = 'needs-restarting -r > /dev/null 2>&1'
|
|
||||||
|
|
||||||
if os == 'Ubuntu':
|
if os == 'Ubuntu':
|
||||||
if path.exists('/var/run/reboot-required'):
|
if path.exists('/var/run/reboot-required'):
|
||||||
@@ -13,6 +12,7 @@ def check():
|
|||||||
retval = 'False'
|
retval = 'False'
|
||||||
|
|
||||||
elif os == 'CentOS':
|
elif os == 'CentOS':
|
||||||
|
cmd = 'needs-restarting -r > /dev/null 2>&1'
|
||||||
try:
|
try:
|
||||||
needs_restarting = subprocess.check_call(cmd.split(), shell=True)
|
needs_restarting = subprocess.check_call(cmd.split(), shell=True)
|
||||||
except subprocess.CalledProcessError:
|
except subprocess.CalledProcessError:
|
||||||
|
|||||||
Reference in New Issue
Block a user