Commit 21a3d727 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

sub the long list to rsync

parent 4aa4b436
......@@ -8,7 +8,8 @@ install:generated_include
@echo $(X393_DEVICES)
install -d $(DESTDIR)/etc/udev/rules.d
install -m 644 90-elphel-automount.rules $(DESTDIR)/etc/udev/rules.d
install -m 644 50-elphel-static-nodes.rules $(DESTDIR)/etc/udev/rules.d
# 100+ seconds to run 50-elphel-static-nodes.rules at boot. Fast if run manually
#install -m 644 50-elphel-static-nodes.rules $(DESTDIR)/etc/udev/rules.d
install -d $(TARGETDIR)
$(mknodes)
......
......@@ -35,21 +35,6 @@ __maintainer__ = "Andrey Filippov"
__email__ = "andrey@elphel.com"
__status__ = "Development"
def create_udev_rules_file(contents):
c = "# --- This is an auto-generated file, see "+sys.argv[0]+"\n"
c += "ACTION!=\"add\", GOTO=\"static_nodes_end\"\n\n"
c += contents
c += "\nLABEL=\"static_nodes_end\""
f = open('50-elphel-static-nodes.rules','w')
f.write(c)
f.close()
def get_udev_rule(mode, name, devtype, major, minor,comment):
tmpstr = comment.strip()+"\n"
tmpstr += "ACTION==\"add\", RUN+=\"/bin/mknod -m "+mode+" /dev/"+name+" "+devtype+" "+major+" "+minor+"\"\n"
return tmpstr
def process_header():
rulestr = ""
......@@ -71,14 +56,7 @@ def process_header():
comment = " # "+comment
print("mknod -m %s $(TARGETDIR)/%-20s %s %3s %3s%s"%(
fs.group(6), fs.group(2), fs.group(7), fs.group(4), fs.group(5), comment))
rulestr += get_udev_rule(fs.group(6), fs.group(2), fs.group(7), fs.group(4), fs.group(5), comment)
line = f.readline()
if rulestr != "":
create_udev_rules_file(rulestr)
print("endef")
if __name__ == "__main__":
process_header()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment