mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-07 09:42:46 +01:00
gracefully handle status check failure on ubuntu
This commit is contained in:
@@ -47,10 +47,14 @@ def check_for_fps():
|
|||||||
fps = 1
|
fps = 1
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
fn = '/proc/sys/crypto/' + feat_full + '_enabled'
|
fn = '/proc/sys/crypto/' + feat_full + '_enabled'
|
||||||
with open(fn, 'r') as f:
|
try:
|
||||||
contents = f.read()
|
with open(fn, 'r') as f:
|
||||||
if '1' in contents:
|
contents = f.read()
|
||||||
fps = 1
|
if '1' in contents:
|
||||||
|
fps = 1
|
||||||
|
except:
|
||||||
|
# Unknown, so assume 0
|
||||||
|
fps = 0
|
||||||
|
|
||||||
with open('/opt/so/log/sostatus/lks_enabled', 'w') as f:
|
with open('/opt/so/log/sostatus/lks_enabled', 'w') as f:
|
||||||
f.write(str(fps))
|
f.write(str(fps))
|
||||||
|
|||||||
Reference in New Issue
Block a user