Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(199)

Unified Diff: client/bin/harness_standalone.py

Issue 6883035: Merge remote branch 'autotest-upstream/master' into autotest-merge (Closed) Base URL: ssh://gitrw.chromium.org:9222/autotest.git@master
Patch Set: patch Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: client/bin/harness_standalone.py
diff --git a/client/bin/harness_standalone.py b/client/bin/harness_standalone.py
index 75a2da90c30e63606608887cf66e28f16096e676..c4b7f26dc4c2fefd9752a80e971eb38b49bba47a 100644
--- a/client/bin/harness_standalone.py
+++ b/client/bin/harness_standalone.py
@@ -5,7 +5,7 @@ The default interface as required for the standalone reboot helper.
__author__ = """Copyright Andy Whitcroft 2007"""
-from autotest_lib.client.common_lib import utils
+from autotest_lib.client.common_lib import utils, error
import os, harness, shutil, logging
class harness_standalone(harness.harness):
@@ -32,11 +32,14 @@ class harness_standalone(harness.harness):
logging.info('Symlinking init scripts')
rc = os.path.join(self.autodir, 'tools/autotest')
- # see if system supports event.d versus inittab
- if os.path.exists('/etc/event.d'):
+ # see if system supports event.d versus systemd versus inittab
+ supports_eventd = os.path.exists('/etc/event.d')
+ supports_systemd = os.path.exists('/etc/systemd')
+ supports_inittab = os.path.exists('/etc/inittab')
+ if supports_eventd or supports_systemd:
# NB: assuming current runlevel is default
initdefault = utils.system_output('/sbin/runlevel').split()[1]
- elif os.path.exists('/etc/inittab'):
+ elif supports_inittab:
initdefault = utils.system_output('grep :initdefault: /etc/inittab')
initdefault = initdefault.split(':')[1]
else:
« no previous file with comments | « client/bin/harness_ABAT.py ('k') | client/bin/job.py » ('j') | client/profilers/perf/perf.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698