diff --git a/tsshbatch.py b/tsshbatch.py index fb0d62b..6dec9b8 100755 --- a/tsshbatch.py +++ b/tsshbatch.py @@ -17,7 +17,7 @@ PROGNAME = "tsshbatch.py" BASENAME = PROGNAME.split(".py")[0] PROGENV = BASENAME.upper() -CVSID = "$Id: tsshbatch.py,v 1.151 2013/10/23 15:54:12 tundra Exp $" +CVSID = "$Id: tsshbatch.py,v 1.152 2013/10/23 16:20:29 tundra Exp $" VERSION = CVSID.split()[2] CPRT = "(c)" @@ -64,7 +64,7 @@ FAILURE = "FAILURE: %s" HOSTSEP = ":" INDENTWIDTH = 8 -OPTIONSLIST = "G:H:NP:ehkn:p:sv" +OPTIONSLIST = "G:H:NP:Sehkn:p:v" PADWIDTH = 12 PATHSEP = os.sep SEPARATOR = " ---> " @@ -77,19 +77,19 @@ USAGE = \ PROGVER + "\n" +\ HOMEPAGE + "\n\n" +\ - "Usage: tsshbatch.py [-Nehksv] [-n name] [-p pw] -G 'file dest' -P 'file dest' [-H 'host ..' | serverlistfile] [command arg ... | - ]\n" +\ + "Usage: tsshbatch.py [-NSehkv] [-n name] [-p pw] -G 'file dest' -P 'file dest' [-H 'host ..' | serverlistfile] [command arg ... | - ]\n" +\ " where,\n" +\ "\n" +\ " -G 'file dest' GET file on host and write local dest directory\n" +\ " -H '...' List of targeted hosts passed as a single argument\n" +\ " -N Force prompting for username\n" +\ " -P 'file dest' PUT local file to host dest directory\n" +\ + " -S Force prompting for sudo password\n" +\ " -e Don't report remote host stderr output\n" +\ " -h Display help\n" +\ " -k Use key exchange-based authentication\n" +\ " -n name Specify login name\n" +\ " -p pw Specify login password\n" +\ - " -s Force prompting for sudo password\n" +\ " -v Display extended program version information\n" ##### @@ -378,6 +378,9 @@ if opt == "-P": ProcessTXRQ(val, Put_Transfer_List) + if opt == "-S": + GETSUDOPW = True + if opt == "-e": REPORTERR = False @@ -394,9 +397,6 @@ if opt == "-p": PWORD = val - if opt == "-s": - GETSUDOPW = True - if opt == "-v": PrintStdout(CVSID) sys.exit() @@ -493,7 +493,7 @@ # The user is prompted for a sudo password under two conditions: # # 1) -k option was selected but no password was set with -p -# 2) -s option was selected +# 2) -S option was selected # # If the user IS prompted for a sudo password, any login password # previously entered - either via -p or interactive entry - will be