diff options
Diffstat (limited to 'src/com.gluster.storage.management.server/WebContent/scripts/grun.py')
| -rwxr-xr-x | src/com.gluster.storage.management.server/WebContent/scripts/grun.py | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/src/com.gluster.storage.management.server/WebContent/scripts/grun.py b/src/com.gluster.storage.management.server/WebContent/scripts/grun.py deleted file mode 100755 index ae93b7f2..00000000 --- a/src/com.gluster.storage.management.server/WebContent/scripts/grun.py +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/python -# Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Management Gateway. -# - -import os -import sys -import Utils - - -def main(): - sshCommandPrefix = "ssh -q -o BatchMode=yes -o GSSAPIAuthentication=no -o PasswordAuthentication=no -o StrictHostKeyChecking=no".split() - - if len(sys.argv) < 3: - sys.stderr.write("usage: %s SERVER_FILE COMMAND [ARGUMENTS]\n" % os.path.basename(sys.argv[0])) - sys.exit(-1) - serverFile = sys.argv[1] - command = sys.argv[2:] - - try: - fp = open(serverFile) - serverNameList = fp.readlines() - fp.close() - except IOError, e: - Utils.log("Failed to read server file %s: %s\n" % (serverFile, str(e))) - sys.exit(1) - - for serverName in serverNameList: - rv = Utils.runCommand(sshCommandPrefix + [serverName.strip()] + command) - print rv - - sys.exit(0) - - -if __name__ == "__main__": - main() |
