(no commit message)
authorStephen Soltesz <soltesz@cs.princeton.edu>
Tue, 28 Sep 2010 23:50:09 +0000 (23:50 +0000)
committerStephen Soltesz <soltesz@cs.princeton.edu>
Tue, 28 Sep 2010 23:50:09 +0000 (23:50 +0000)
histlog/add_conf_files.py
histlog/histlog_snoopy_sh

index 2afcdd0..fef972d 100644 (file)
@@ -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})
 
index d1ef897..d03c6a4 100644 (file)
@@ -35,3 +35,5 @@ if child_of_sshd ; then
     export LD_PRELOAD=/usr/lib/snoopy.so
 fi
 
+unset pid2ppid
+unset pid2cmd