From: Brian Warner Date: Thu, 11 Oct 2007 09:48:06 +0000 (-0700) Subject: rename client.tac to tahoe-client.tac, so that 'ps ax|grep tahoe' works. Closes ... X-Git-Tag: allmydata-tahoe-0.6.1~41 X-Git-Url: https://git.rkrishnan.org/%5B/%5D%20/uri/flags/reliability?a=commitdiff_plain;h=ee72a5adfd6a3a116baa4c46bca03fc46e5c1851;p=tahoe-lafs%2Ftahoe-lafs.git rename client.tac to tahoe-client.tac, so that 'ps ax|grep tahoe' works. Closes #156. --- diff --git a/src/allmydata/scripts/create_node.py b/src/allmydata/scripts/create_node.py index aab1eaba..bb7b9ce2 100644 --- a/src/allmydata/scripts/create_node.py +++ b/src/allmydata/scripts/create_node.py @@ -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 diff --git a/src/allmydata/scripts/startstop_node.py b/src/allmydata/scripts/startstop_node.py index dc5b1894..f8de7924 100644 --- a/src/allmydata/scripts/startstop_node.py +++ b/src/allmydata/scripts/startstop_node.py @@ -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): diff --git a/src/allmydata/test/check_memory.py b/src/allmydata/test/check_memory.py index 9592810c..862035b8 100644 --- a/src/allmydata/test/check_memory.py +++ b/src/allmydata/test/check_memory.py @@ -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") diff --git a/src/allmydata/test/test_runner.py b/src/allmydata/test/test_runner.py index 4faa321f..c21d6266 100644 --- a/src/allmydata/test/test_runner.py +++ b/src/allmydata/test/test_runner.py @@ -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,