more renamings
[nodemanager.git] / tools.py
index 80685de..98a5b7e 100644 (file)
--- a/tools.py
+++ b/tools.py
@@ -13,7 +13,7 @@ import subprocess
 
 import logger
 
-PID_FILE = '/var/run/nm.pid'
+PID_FILE = '/var/run/nodemanager.pid'
 
 ####################
 def get_default_if():
@@ -64,7 +64,7 @@ def daemon():
     devnull = os.open(os.devnull, os.O_RDWR)
     os.dup2(devnull, 0)
     # xxx fixme - this is just to make sure that nothing gets stupidly lost - should use devnull
-    crashlog = os.open('/var/log/nm.daemon', os.O_RDWR | os.O_APPEND | os.O_CREAT, 0644)
+    crashlog = os.open('/var/log/nodemanager.daemon', os.O_RDWR | os.O_APPEND | os.O_CREAT, 0644)
     os.dup2(crashlog, 1)
     os.dup2(crashlog, 2)
 
@@ -91,7 +91,9 @@ def fork_as(su, function, *args):
 ####################
 # manage files
 def pid_file():
-    """We use a pid file to ensure that only one copy of NM is running at a given time.  If successful, this function will write a pid file containing the pid of the current process.  The return value is the pid of the other running process, or None otherwise."""
+    """We use a pid file to ensure that only one copy of NM is running at a given time.  
+If successful, this function will write a pid file containing the pid of the current process.  
+The return value is the pid of the other running process, or None otherwise."""
     other_pid = None
     if os.access(PID_FILE, os.F_OK):  # check for a pid file
         handle = open(PID_FILE)  # pid file exists, read it