From 80d4c8b44cf8e12b89d63bbd4e468ed4b535655b Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Fri, 5 Jun 2015 13:45:03 +0200 Subject: Actually work. --- mklog.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mklog.py b/mklog.py index eb0f2bc..7975171 100755 --- a/mklog.py +++ b/mklog.py @@ -116,10 +116,8 @@ def make_authkeys(nodenames): os.mkdir(wdir) os.chdir(wdir) - priv_dst = '../nodes/%s/%s-private.pem' % (nodename, nodename) - pub_dst = '../nodes/%s/publickeys' % nodename - for nodename in nodenames: + priv_dst = '../nodes/%s/%s-private.pem' % (nodename, nodename) if os.access(priv_dst, os.R_OK): continue if not make_eckey(nodename): @@ -128,6 +126,7 @@ def make_authkeys(nodenames): os.chmod(priv_dst, stat.S_IWUSR) shutil.move('%s-private.pem' % nodename, priv_dst) for nodename in nodenames: + pub_dst = '../nodes/%s/publickeys' % nodename shutil.rmtree(pub_dst, ignore_errors=True) shutil.copytree('.', pub_dst) -- cgit v1.1