From e1750bca624585bdf5b13e2cd3afb9cbf64bd098 Mon Sep 17 00:00:00 2001 From: Philip O'Toole Date: Wed, 20 Nov 2013 21:24:31 -0800 Subject: [PATCH 1/3] Replace "install" with "setup". Ticket: LOGGLY-4252 --- configure-syslog.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/configure-syslog.py b/configure-syslog.py index 82215e9..1024283 100755 --- a/configure-syslog.py +++ b/configure-syslog.py @@ -4,7 +4,7 @@ # Loggly Syslog configuration script. # # This script automatically configures a syslog-ng or rsyslog -# installation such that it sends all logs from this system to Loggly. +# setup such that it sends all logs from this system to Loggly. # # For this to work you must have an account on the Loggly system. Sign # up for one at http://www.loggly.com. @@ -976,7 +976,7 @@ def modify_syslog_config_file(syslog_id, syslog_configuration_details, if len(syslog_configuration_details.get("token")) <= 0: question = ("\nThe Loggly configuration will be appended to (%s) file." - "\n\nDo you want this installer to modify " + "\n\nDo you want this setup-script to modify " "the configuration file?" % default_config_file_name.get(syslog_id)) modify = noconfirm or confirm(question) @@ -1249,7 +1249,7 @@ def perform_sanity_check_and_get_product_for_configuration(current_environment, return syslog_name_for_configuration def install(current_environment): - printLog("Installation started") + printLog("Setup started") # 1. Determine user type. user_type = get_user_type() # 2. Determine the environment in which it was invoked @@ -1289,10 +1289,10 @@ def verify(current_environment): printLog("Verification completed") def uninstall(current_environment): - printLog("Uninstall started") + printLog("Revert started") user_type = get_user_type() if user_type == NON_ROOT_USER: - printLog("Please become root to uninstall") + printLog("Please become root to revert") sys.exit() #No need to check syslog service for uninstall syslog_name_for_configuration = \ @@ -1303,7 +1303,7 @@ def uninstall(current_environment): if not selinux_status: noconfirm = current_environment['options'].noconfirm confirm_syslog_restart(syslog_name_for_configuration, noconfirm) - printLog("Uninstall completed") + printLog("Revert completed") def rsyslog_dryrun(): results = get_stderr_from_process('rsyslogd -N1') @@ -1370,8 +1370,8 @@ def dryrun(current_environment): module_dict = { 'sysinfo' : write_env_details, - 'install' :install, - 'uninstall' : uninstall, + 'setup' :install, + 'revert' : uninstall, 'verify' : verify, 'dryrun' : dryrun } @@ -1427,8 +1427,8 @@ def parse_args(self, *args, **kwargs): CMD_USAGE = ''' %prog [option] Action: -\tinstall Configure the syslog -\tuninstall Remove changes made by the syslog configuration script +\tsetup Configure your syslog installtion +\trevert Remove changes made by the syslog configuration script \tverify Verify the configuration explicitly \tsysinfo Print, write system information \tloggly_help Guideline for users for each step to configure syslog @@ -1446,7 +1446,7 @@ def parse_options(): parser = PAOptionParser(usage=CMD_USAGE) parser.add_posarg("action", dest='action', type="choice", - choices=('install', 'uninstall', 'verify', + choices=('setup', 'revert', 'verify', 'sysinfo', 'loggly_help', 'dryrun')) parser.add_option("-y", "--yes", action="store_true", dest='noconfirm') parser.add_option("-s", "--subdomain") From 7d5c104ccb4ed40617eba9f679114bc96058cfd0 Mon Sep 17 00:00:00 2001 From: Philip O'Toole Date: Wed, 20 Nov 2013 21:28:07 -0800 Subject: [PATCH 2/3] Use "account" instead of "subdomain". Ticket: LOGGLY-4104 --- configure-syslog.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure-syslog.py b/configure-syslog.py index 1024283..bc700a3 100755 --- a/configure-syslog.py +++ b/configure-syslog.py @@ -1382,7 +1382,7 @@ def loggly_help(): loggly_user, loggly_password, loggly_subdomain = login() auth_tokens = get_auth(loggly_user, loggly_password, loggly_subdomain) logglyhelp = LOGGLY_HELP % { - 'subdomain': loggly_subdomain, + 'account': loggly_subdomain, 'token': auth_tokens[-1], 'dist_id': DISTRIBUTION_ID, 'syslog_server': LOGGLY_SYSLOG_SERVER, @@ -1434,7 +1434,7 @@ def parse_args(self, *args, **kwargs): \tloggly_help Guideline for users for each step to configure syslog \tdryrun Perform configuration steps without modifying anything Option: -\tsubdomain Name of loggly account being connected to +\taccount Name of loggly account being connected to \tauth Loggly auth token to use for logging \tyes Skip confirmations -- assume yes '''.lstrip() @@ -1449,7 +1449,7 @@ def parse_options(): choices=('setup', 'revert', 'verify', 'sysinfo', 'loggly_help', 'dryrun')) parser.add_option("-y", "--yes", action="store_true", dest='noconfirm') - parser.add_option("-s", "--subdomain") + parser.add_option("-s", "--account") parser.add_option("-a", "--auth") (options, args) = parser.parse_args() return options From dc510feb4df28b1a1192e459a9c763cad31ecb28 Mon Sep 17 00:00:00 2001 From: Philip O'Toole Date: Thu, 21 Nov 2013 06:16:55 -0800 Subject: [PATCH 3/3] Some copy changes. Ticket: LOGGLY-4252 --- configure-syslog.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/configure-syslog.py b/configure-syslog.py index bc700a3..def542b 100755 --- a/configure-syslog.py +++ b/configure-syslog.py @@ -976,8 +976,7 @@ def modify_syslog_config_file(syslog_id, syslog_configuration_details, if len(syslog_configuration_details.get("token")) <= 0: question = ("\nThe Loggly configuration will be appended to (%s) file." - "\n\nDo you want this setup-script to modify " - "the configuration file?" + "\n\nWould you like to have the configuration file modified?" % default_config_file_name.get(syslog_id)) modify = noconfirm or confirm(question) if modify: @@ -1427,8 +1426,8 @@ def parse_args(self, *args, **kwargs): CMD_USAGE = ''' %prog [option] Action: -\tsetup Configure your syslog installtion -\trevert Remove changes made by the syslog configuration script +\tsetup Configure your syslog setup +\trevert Revert changes made by this syslog configuration script \tverify Verify the configuration explicitly \tsysinfo Print, write system information \tloggly_help Guideline for users for each step to configure syslog