Support systemd socket activation
Check if systemd passed us a socket when starting obmc-console before
creating the socket ourselves. This will support use cases where we
don't need obmc-console until a SoL is activated by the user.
Tested: Verified that existing unit file installation is unchanged -
statically enabled obmc-console@.service instances will be started.
Then disabled obmc-console@ttyS2.service and enabled
obmc-console@ttyS2.socket (with a drop-in change to override
ListenStream to "obmc-console") and verifed that activating Redfish and
SSH SoL would start obmc-console@ttyS2.service and console redirection
worked.
Change-Id: I42e96af46a5893145abf27761e97fd4f1b73719d
Signed-off-by: Jonathan Doman <jonathan.doman@intel.com>
diff --git a/Makefile.am b/Makefile.am
index 2ee97a2..696fec9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -11,6 +11,7 @@
if WITH_SYSTEMD
systemdsystemunit_DATA = conf/obmc-console@.service \
+ conf/obmc-console@.socket \
conf/obmc-console-ssh@.service
if ENABLE_CONCURRENT_SERVERS