X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=histlog%2Fadd_conf_files.py;h=fef972dc794e13edcfb2acc3d63020c566587bf5;hb=4fdb3f1a73ed9a8f48c120670cd6e0533bcb9741;hp=2afcdd0c97d9aabd85e60be493c6e948bce21299;hpb=aa94293c8e99fbe32a0224ea8b0538ecae4493f3;p=monitor.git diff --git a/histlog/add_conf_files.py b/histlog/add_conf_files.py index 2afcdd0..fef972d 100644 --- a/histlog/add_conf_files.py +++ b/histlog/add_conf_files.py @@ -13,14 +13,18 @@ c2 = {'file_owner': 'root', 'dest': '/etc/profile.d/histlog_snoopy.sh', 'enabled': True, 'file_permissions': '644', - 'source':'PlanetLabConf/histlog/histlog_sh', + 'source':'PlanetLabConf/histlog/histlog_snoopy_sh', 'always_update': False, 'file_group': 'root'} h = 'planetlab1.cs.stevens-tech.edu' -i = AddConfFile(c); if h: AddConfFileToNode(i, h) -i = AddConfFile(c2); if h: AddConfFileToNode(i, h) +i = AddConfFile(c) +if h: + AddConfFileToNode(i, h) +i = AddConfFile(c2) +if h: + AddConfFileToNode(i, h) # This does not cover nodes in FAILBOOT. The above commands should also be # added to BootManager so that commands taken by admins are uploaded before @@ -35,13 +39,35 @@ c3 = {'file_owner': 'root', 'file_group': 'root'} c4 = {'file_owner': 'root', - 'dest': '/usr/bin/collect_snoopylog.sh', + 'dest': '/usr/bin/collect_log.sh', 'enabled': True, 'file_permissions': '750', - 'source': 'PlanetLabConf/histlog/collect_snoopylog_sh', + 'source': 'PlanetLabConf/histlog/collect_log_sh', 'always_update': False, 'file_group': 'root'} -i = AddConfFile(c3); if h: AddConfFileToNode(i, h) -i = AddConfFile(c4); if h: AddConfFileToNode(i, h) +# NOTE: requires sshd_config option: PermitUserEnvironment=yes +c5 = {'file_owner': 'root', + 'dest': '/root/.ssh/environment', + 'enabled': True, + 'file_permissions': '644', + 'source': 'PlanetLabConf/histlog/environment', + 'always_update': False, + 'file_group': 'root'} + +i = AddConfFile(c3) +if h: + AddConfFileToNode(i, h) + +i = AddConfFile(c4) +if h: + AddConfFileToNode(i, h) + +i = AddConfFile(c5) +if h: + AddConfFileToNode(i, h) + + +for i in [84, 85, 86]: + UpdateConfFile(i, {'enabled': False})