diff options
author | Harm Weites <harm@weites.com> | 2013-12-14 19:16:05 +0000 |
---|---|---|
committer | Harm Weites <harm@weites.com> | 2013-12-14 19:16:05 +0000 |
commit | 8a2b80adfb66f9036dc617ff65b7f6ab4464ca5d (patch) | |
tree | 4617e6132878241744b2c8e784f2a4609e4b3411 /cloudinit/config/cc_power_state_change.py | |
parent | bd96af406f268e3fe41537125be4cf2dfc9ea5bc (diff) | |
download | vyos-cloud-init-8a2b80adfb66f9036dc617ff65b7f6ab4464ca5d.tar.gz vyos-cloud-init-8a2b80adfb66f9036dc617ff65b7f6ab4464ca5d.zip |
change: Use util.system_info().
Diffstat (limited to 'cloudinit/config/cc_power_state_change.py')
-rw-r--r-- | cloudinit/config/cc_power_state_change.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/cloudinit/config/cc_power_state_change.py b/cloudinit/config/cc_power_state_change.py index 46ce5ba5..8efef24b 100644 --- a/cloudinit/config/cc_power_state_change.py +++ b/cloudinit/config/cc_power_state_change.py @@ -23,7 +23,6 @@ import errno import os import re import subprocess -import sys import time frequency = PER_INSTANCE @@ -44,7 +43,7 @@ def givecmdline(pid): # Example output from procstat -c 16357 # PID COMM ARGS # 1 init /bin/init -- - if sys.platform.startswith('freebsd'): + if util.system_info()["platform"].startswith('FreeBSD'): (output, _err) = util.subp(['procstat', '-c', str(pid)]) line = output.splitlines()[1] m = re.search('\d+ (\w|\.|-)+\s+(/\w.+)', line) |