Commit 360cb1a1 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

added interfaces generation to makefile

parent a268273f
...@@ -8,10 +8,14 @@ STATEDIR = $(DESTDIR)/var/volatile/state ...@@ -8,10 +8,14 @@ STATEDIR = $(DESTDIR)/var/volatile/state
STATELINK = $(DESTDIR)/var/state STATELINK = $(DESTDIR)/var/state
LINK = ln LINK = ln
NETWORKDIR = $(DESTDIR)/etc/network
PYTHON = python
OWN = -o root -g root OWN = -o root -g root
INSTALL = install INSTALL = install
INSTMODE = 0755 INSTMODE = 0755
INSTDOCS = 0644
SCRIPT1=init_elphel393.py SCRIPT1=init_elphel393.py
SCRIPT2=init_elphel393 SCRIPT2=init_elphel393
...@@ -23,6 +27,8 @@ SCRIPT2=init_elphel393 ...@@ -23,6 +27,8 @@ SCRIPT2=init_elphel393
all: all:
@echo "make all in src" @echo "make all in src"
# expect a file: generated/interfaces
$(PYTHON) generate_default_network_interfaces.py $(REMOTE_IP) $(REMOTE_NETMASK) $(REMOTE_GATEWAY)
install: install:
@echo "make install in src" @echo "make install in src"
...@@ -62,5 +68,9 @@ install: ...@@ -62,5 +68,9 @@ install:
$(INSTALL) $(OWN) -d $(STATEDIR) $(INSTALL) $(OWN) -d $(STATEDIR)
$(LINK) -s -r $(STATEDIR) $(STATELINK) $(LINK) -s -r $(STATEDIR) $(STATELINK)
# install src/interfaces to /etc/network/interfaces
$(INSTALL) $(OWN) -d $(NETWORKDIR)
$(INSTALL) $(OWN) -m $(INSTDOCS) generated/interfaces $(NETWORKDIR)/interfaces
clean: clean:
@echo "make clean in src" @echo "make clean in src"
...@@ -31,7 +31,7 @@ from __future__ import print_function ...@@ -31,7 +31,7 @@ from __future__ import print_function
''' '''
__copyright__ = "Copyright (C) 2018 Elphel, Inc." __copyright__ = "Copyright (C) 2018 Elphel, Inc."
__license__ = "GPL-3.0+" __license__ = "GPL-3.0-or-later"
__maintainer__ = "Oleg Dzhimiev" __maintainer__ = "Oleg Dzhimiev"
__email__ = "oleg@elphel.com" __email__ = "oleg@elphel.com"
......
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