diff options
author | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-11-02 15:46:37 (GMT) |
---|---|---|
committer | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-11-02 15:46:37 (GMT) |
commit | 1c20f570071d99ef56a53cc81cbda2cba6c5b439 (patch) | |
tree | 9a0a2185275c2bc48ea9268d58ce5820ed6c20f3 | |
parent | 646e5a22e74f7452c8be2c4d745a13ec38d30ad6 (diff) |
If pre-checks fails stop
-rwxr-xr-x | scripts/check-system | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/scripts/check-system b/scripts/check-system index ab655a4..568a58a 100755 --- a/scripts/check-system +++ b/scripts/check-system @@ -391,10 +391,14 @@ def run_checks(distro, checks): if failed_checks: print "Failed checks\n" + else: + return True for check in failed_checks: print "[%s] %s" % (check["checker"], check["check"]) + return False + def start_xvfb(): xvfb_proc = subprocess.Popen(args=["Xvfb", xvfb_display], stdout=devnull, @@ -466,13 +470,12 @@ def warn_if_unsupported(distro): distro = check_distro() -run_checks(distro, pre_checks) - -xvfb_proc, orig_display = start_xvfb() +if run_checks(distro, pre_checks): + xvfb_proc, orig_display = start_xvfb() -run_checks(distro, checks) + run_checks(distro, checks) -warn_if_unsupported(distro) -apply_distro_tweaks(distro) + warn_if_unsupported(distro) + apply_distro_tweaks(distro) -stop_xvfb(xvfb_proc, orig_display) + stop_xvfb(xvfb_proc, orig_display) |