From ae74e4c11a7f562aff658be44b81a9095661bc83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=99=A5=20Ivan=20Tam=20=E2=99=A5?= Date: Tue, 3 Sep 2013 13:47:25 +0000 Subject: [PATCH 1/2] LOGGLY-3903 Remove prompts to run 'verify' action When users run the install script as shown in our docs, the install-script is never saved to disk, so users cannot re-run the script with any 'verify' action. We should not advertise an action they cannot run without re-downloading the script. --- configure-syslog.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/configure-syslog.py b/configure-syslog.py index d5b0fc4..4f14ee0 100755 --- a/configure-syslog.py +++ b/configure-syslog.py @@ -944,9 +944,8 @@ def create_bash_script(content): config_file = open(file_path, "w") config_file.write(content) config_file.close() - Logger.printLog(("Current user is not root user. Run script %s as root," - "restart syslog service and then " - "run configure-syslog.py again with 'verify'" + Logger.printLog(("Current user is not root user. Run script %s as root then " + "restart the syslog service" % file_path), prio = 'crit', print_comp = True) def create_loggly_config_file(syslog_id, syslog_configuration_details, @@ -1317,14 +1316,18 @@ def install(current_environment): (authorization_details['token'], modified_config_file), print_comp = True, prio = 'debug') Logger.printLog("Installation completed", prio = 'debug') - print("You may verify installation by re-running with action 'verify'") + return syslog_name_for_configuration def verify(current_environment): Logger.printLog("Verification started", prio = 'debug') + perform_sanity_check_and_get_product_for_configuration(current_environment) + loggly_user, loggly_password, loggly_subdomain = login() + doverify(loggly_user, loggly_password, loggly_subdomain) + Logger.printLog("Verification completed", prio = 'debug') def uninstall(current_environment): @@ -1507,4 +1510,4 @@ def main(): Logger.printLog(traceback.format_exc()) finally: Logger.printLog('Configure script has errors') - sys.exit(-1) \ No newline at end of file + sys.exit(-1) From 3d3196e1630671c5074e8de7586d687535de346e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=99=A5=20Ivan=20Tam=20=E2=99=A5?= Date: Tue, 3 Sep 2013 14:18:00 +0000 Subject: [PATCH 2/2] Return to dense spacing --- configure-syslog.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/configure-syslog.py b/configure-syslog.py index 4f14ee0..f8ae9f2 100755 --- a/configure-syslog.py +++ b/configure-syslog.py @@ -1321,13 +1321,9 @@ def install(current_environment): def verify(current_environment): Logger.printLog("Verification started", prio = 'debug') - perform_sanity_check_and_get_product_for_configuration(current_environment) - loggly_user, loggly_password, loggly_subdomain = login() - doverify(loggly_user, loggly_password, loggly_subdomain) - Logger.printLog("Verification completed", prio = 'debug') def uninstall(current_environment):