summaryrefslogtreecommitdiffstats
path: root/lavalab-gen.py
diff options
context:
space:
mode:
authorkhilman <khilman@users.noreply.github.com>2018-02-06 15:49:45 -0800
committerGitHub <noreply@github.com>2018-02-06 15:49:45 -0800
commite133ad82d7f0bb710f3f1a2b1f12ad932e577592 (patch)
tree1b99b4f7d782f433b2ee1f672899fde2db0ee5bc /lavalab-gen.py
parent8ebd1780f24f983907bf3d7d30b4306b67e0dae5 (diff)
parentdd13a9f0eb4732e72082738f800b81a92d0eb10c (diff)
Merge pull request #18 from montjoie/rework-udev
Rework udev
Diffstat (limited to 'lavalab-gen.py')
-rwxr-xr-xlavalab-gen.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/lavalab-gen.py b/lavalab-gen.py
index 0e0b583..55f2317 100755
--- a/lavalab-gen.py
+++ b/lavalab-gen.py
@@ -42,7 +42,6 @@ def main(args):
fp = open(boards_yaml, "r")
labs = yaml.load(fp)
fp.close()
- udev_line =""
tdc = open("docker-compose.template", "r")
dockcomp = yaml.load(tdc)
tdc.close()
@@ -62,6 +61,7 @@ def main(args):
fp.close()
for lab_name in labs:
+ udev_line =""
lab = labs[lab_name]
for board_name in lab["boardlist"]:
b = lab["boardlist"][board_name]
@@ -101,7 +101,9 @@ def main(args):
fp = open(board_device_file, "w")
fp.write(device_line)
fp.close()
- fp = open("lavalab-udev-%s.rules" % lab_name, "w")
+ if not os.path.isdir("udev"):
+ os.mkdir("udev")
+ fp = open("udev/99-lavalab-udev-%s.rules" % lab_name, "w")
fp.write(udev_line)
fp.close()
if lab.has_key("dispatcher_ip"):