conf: Ship default configuration and systemd units
Two configurations are supported:
1. A socket-activated, single-port client service arrangement, and
2. A port-templated client service
systemd's template-unit constraints prevent us from mapping ports to a
daemon configuration for the socket-activated case. To support multiple
concurrent console servers we have to revert to a standard daemon
arrangement where dropbear binds, listens and accepts its own
connections. This brings with it immediate memory overhead of running
dropbear before connections are received. As such configuration 2 is
opt-in as there are very few systems that require it.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Ifbcac1b1ca75ab3ff08c73855d7ed2ebabc27c0a
diff --git a/Makefile.am b/Makefile.am
index ce84c4c..f1a3a18 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,21 @@
sbin_PROGRAMS = obmc-console-server
bin_PROGRAMS = obmc-console-client
-EXTRA_DIST = obmc-console.conf.sample
+obmcconsoledir = $(sysconfdir)/obmc-console
+obmcconsole_DATA = conf/server.ttyVUART0.conf
+
+if WITH_SYSTEMD
+systemdsystemunit_DATA = conf/obmc-console@.service \
+ conf/obmc-console-ssh@.service
+
+if ENABLE_CONCURRENT_SERVERS
+obmcconsole_DATA += conf/client.2200.conf
+else
+systemdsystemunit_DATA += conf/obmc-console-ssh.socket
+sshservicedir = $(systemdsystemunitdir)/obmc-console-ssh@.service.d
+sshservice_DATA = conf/obmc-console-ssh@.service.d/use-socket.conf
+endif
+endif
obmc_console_server_CPPFLAGS = \
-DLOCALSTATEDIR=\"$(localstatedir)\" \