From 28d77aea33cb412ed6d23949580aeb45b7873cbb Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Sat, 3 Sep 2022 22:53:38 +0300 Subject: [PATCH] selfcheck.py: skip boot duration check on not Clover image --- clover/src/selfcheck.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/clover/src/selfcheck.py b/clover/src/selfcheck.py index ad539467..159fcad2 100755 --- a/clover/src/selfcheck.py +++ b/clover/src/selfcheck.py @@ -625,6 +625,10 @@ def check_rangefinder(): @check('Boot duration') def check_boot_duration(): + if not os.path.exists('/etc/clover_version'): + info('skip check') + return # Don't check not on Clover's image + output = subprocess.check_output('systemd-analyze').decode() r = re.compile(r'([\d\.]+)s\s*$', flags=re.MULTILINE) duration = float(r.search(output).groups()[0])