Supply Serial port as an optional argument to obmc-console-server

obmc-console-server is a serial console server that currently uses
ttyS5 on the BMC and this is configured in obmc-console.conf.

This patch introduced a new parameter so that tty port can be specified
while starting the server. When this parameter is passed, it overrides
the TTY that has been given in the configuration file.

This feature is being added to support systemd template unit files.

We would write a 'obmc-console@.service' file and then start
'obmc-console@ttyS5' and the part after the @ becomes a parameter to the unit
that can be passed along. This is only "useful" if we have somewhere to pass it
to.

One aspect of the template unit, which is appropriate to this issue, is that the
template parameter can be used as a dependency, so we can ensure the service
obmc-console@%s will not start unless /dev/%s is present.

Below are the advantages of this approach:

	1. We can use systemd template unit files as intended without hard-coding the
	   dev-entry.

	2. It gets us very close to being able to handle multiple host consoles for a
	   blade-chassis style system.

	3. It allows us to easily map a [virtual] physical UART in QEMU to the
	   obmc-console application for test purposes.

Change-Id: I6599a2572e2db996fba9a19a3d65ff502d550114
Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
2 files changed