configure logger based on hostname

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-10-11 16:19:27 +02:00
parent d4f6328eef
commit 4c29d9839b
2 changed files with 12 additions and 5 deletions

View file

@ -114,10 +114,6 @@ def configinstall(args, mode):
time_start = time.time()
# FIXME: do not overwrite, if set!
os.environ['__remote_exec'] = "ssh -o User=root -q"
os.environ['__remote_copy'] = "scp -o User=root -q"
for host in args.host:
c = mode(host,
initial_manifest=args.manifest,

View file

@ -38,7 +38,8 @@ class Context:
target_host,
initial_manifest=False,
base_path=False,
exec_path=sys.argv[0]):
exec_path=sys.argv[0],
debug):
self.target_host = target_host
@ -88,6 +89,16 @@ class Context:
self.remote_type_path = os.path.join(self.remote_conf_path, "type")
self.remote_global_explorer_path = os.path.join(self.remote_conf_path, "explorer")
if '__remote_exec' in os.environ:
self.remote_exec = os.environ['__remote_exec']
else:
self.remote_exec = "ssh -o User=root -q"
if '__remote_copy' in os.environ:
self.remote_copy = os.environ['__remote_copy']
else:
self.remote_copy = "scp -o User=root -q"
def cleanup(self):
# Do not use in __del__:
# http://docs.python.org/reference/datamodel.html#customization