Skip to content

Commit

Permalink
[needs-restarting] fix -r in nspawn containers
Browse files Browse the repository at this point in the history
=changelog=
msg: [needs-restarting] fix -r in nspawn containers
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1913962
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1914251
  • Loading branch information
inknos authored and m-blaha committed Jan 21, 2021
1 parent b32396e commit 15d240e
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions plugins/needs_restarting.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,7 @@ def __init__(self):

@staticmethod
def get_boot_time():
with open('/proc/stat') as stat_file:
for line in stat_file.readlines():
if not line.startswith('btime '):
continue
return int(line[len('btime '):].strip())
return int(os.stat('/proc/1/cmdline').st_mtime)

@staticmethod
def get_sc_clk_tck():
Expand Down

0 comments on commit 15d240e

Please sign in to comment.