]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
rename client.tac to tahoe-client.tac, so that 'ps ax|grep tahoe' works. Closes ...
authorBrian Warner <warner@lothar.com>
Thu, 11 Oct 2007 09:48:06 +0000 (02:48 -0700)
committerBrian Warner <warner@lothar.com>
Thu, 11 Oct 2007 09:48:06 +0000 (02:48 -0700)
src/allmydata/scripts/create_node.py
src/allmydata/scripts/startstop_node.py
src/allmydata/test/check_memory.py
src/allmydata/test/test_runner.py

index aab1eabada6d237fa75aa794bc34d75c1cb021a0..bb7b9ce2e241bab7a5e56ae829fb82d4b0b88453 100644 (file)
@@ -49,7 +49,7 @@ def create_client(basedir, config, out=sys.stdout, err=sys.stderr):
         # we're willing to use an empty directory
     else:
         os.mkdir(basedir)
-    f = open(os.path.join(basedir, "client.tac"), "w")
+    f = open(os.path.join(basedir, "tahoe-client.tac"), "w")
     f.write(client_tac)
     f.close()
     if config.get('webport', "none").lower() != "none":
@@ -69,7 +69,7 @@ def create_introducer(basedir, config, out=sys.stdout, err=sys.stderr):
         # we're willing to use an empty directory
     else:
         os.mkdir(basedir)
-    f = open(os.path.join(basedir, "introducer.tac"), "w")
+    f = open(os.path.join(basedir, "tahoe-introducer.tac"), "w")
     f.write(introducer_tac)
     f.close()
     print >>out, "introducer created in %s" % basedir
index dc5b1894a0f6c0f109b824e09df9f923fd881240..f8de7924e55cdae03acdf497d6c34e2213e79740 100644 (file)
@@ -34,9 +34,15 @@ def do_start(basedir, profile=False, out=sys.stdout, err=sys.stderr):
     if os.path.exists(os.path.join(basedir, "client.tac")):
         tac = "client.tac"
         type = "client"
+    elif os.path.exists(os.path.join(basedir, "tahoe-client.tac")):
+        tac = "tahoe-client.tac"
+        type = "client"
     elif os.path.exists(os.path.join(basedir, "introducer.tac")):
         tac = "introducer.tac"
         type = "introducer"
+    elif os.path.exists(os.path.join(basedir, "tahoe-introducer.tac")):
+        tac = "tahoe-introducer.tac"
+        type = "introducer"
     else:
         print >>err, "%s does not look like a node directory" % basedir
         if not os.path.isdir(basedir):
index 9592810c993c746396da7a2f37f2a49f1a864465..862035b84b9aa8044e138c0ced3755a671c608be 100644 (file)
@@ -270,7 +270,7 @@ this file are ignored.
         pp = ClientWatcher()
         self.proc_done = pp.d = defer.Deferred()
         logfile = os.path.join(self.basedir, "client.log")
-        cmd = ["twistd", "-n", "-y", "client.tac", "-l", logfile]
+        cmd = ["twistd", "-n", "-y", "tahoe-client.tac", "-l", logfile]
         env = os.environ.copy()
         self.proc = reactor.spawnProcess(pp, cmd[0], cmd, env, path=clientdir)
         log.msg("CLIENT STARTED")
index 4faa321ffcb05394b6d12bd429e7591498512676..c21d6266d59092f0e3795c802d0e76d5ec3609da 100644 (file)
@@ -24,7 +24,7 @@ class CreateNode(unittest.TestCase):
         self.failUnlessEqual(out.getvalue(), "")
         self.failUnlessEqual(rc, 0)
         self.failUnless(os.path.exists(c1))
-        self.failUnless(os.path.exists(os.path.join(c1, "client.tac")))
+        self.failUnless(os.path.exists(os.path.join(c1, "tahoe-client.tac")))
 
         # creating the client a second time should throw an exception
         out,err = StringIO(), StringIO()
@@ -37,7 +37,7 @@ class CreateNode(unittest.TestCase):
         argv = ["--quiet", "create-client", c2]
         runner.runner(argv)
         self.failUnless(os.path.exists(c2))
-        self.failUnless(os.path.exists(os.path.join(c2, "client.tac")))
+        self.failUnless(os.path.exists(os.path.join(c2, "tahoe-client.tac")))
 
         self.failUnlessRaises(usage.UsageError,
                               runner.runner,
@@ -54,7 +54,8 @@ class CreateNode(unittest.TestCase):
         self.failUnlessEqual(out.getvalue(), "")
         self.failUnlessEqual(rc, 0)
         self.failUnless(os.path.exists(c1))
-        self.failUnless(os.path.exists(os.path.join(c1, "introducer.tac")))
+        self.failUnless(os.path.exists(os.path.join(c1,
+                                                    "tahoe-introducer.tac")))
 
         # creating the introducer a second time should throw an exception
         out,err = StringIO(), StringIO()
@@ -67,7 +68,8 @@ class CreateNode(unittest.TestCase):
         argv = ["--quiet", "create-introducer", c2]
         runner.runner(argv)
         self.failUnless(os.path.exists(c2))
-        self.failUnless(os.path.exists(os.path.join(c2, "introducer.tac")))
+        self.failUnless(os.path.exists(os.path.join(c2,
+                                                    "tahoe-introducer.tac")))
 
         self.failUnlessRaises(usage.UsageError,
                               runner.runner,