/etc/init/ttyAMA0.conf causes endless tty spewage if ttyAMA does not exist
Bug #1273205 reported by
Martin Pitt
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init (Ubuntu) |
Fix Released
|
Medium
|
Robert C Jennings | ||
lxc (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I created an LXC container with the current armhf cloud images on a Calxeda node. Due to /etc/init/
<4>init: ttyAMA0 main process (3035) terminated with status 1
<4>init: ttyAMA0 main process ended, respawning
This makes working in a terminal rather hard and also clutters logs. Can the job please be fixed to only start up if there actually is a /dev/ttyAMA*?
$ uname -a
Linux trusty-cloud 3.11.0-15-generic #23-Ubuntu SMP Mon Dec 9 18:18:34 UTC 2013 armv7l armv7l armv7l GNU/Linux
$ ls -l /dev/ttyA*
ls: cannot access /dev/ttyA*: No such file or directory
Changed in cloud-init (Ubuntu): | |
milestone: | none → ubuntu-13.04-month-5 |
milestone: | ubuntu-13.04-month-5 → none |
milestone: | none → raring-updates |
importance: | Undecided → Medium |
Changed in cloud-init (Ubuntu): | |
status: | In Progress → Incomplete |
To post a comment you must log in.
The problem can be mitigated by deleting /etc/init/ ttyAMA0. conf or editing to contain the following:
# ttyAMA0 - getty
#
# This service maintains a getty on ttyAMA0 from the point the system is
# started until it is shut down again.
start on stopped rc RUNLEVEL=[2345] and (
not- container or
container CONTAINER=lxc or
container CONTAINER= lxc-libvirt)
stop on runlevel [!2345]
pre-start script
# getty will not be started if the serial console is not present
stty -F /dev/ttyAMA0 -a 2> /dev/null > /dev/null || { stop ; exit 0; }
end script
respawn
script
exec /sbin/getty -L ttyAMA0 115200 vt102
end script
# written by cloud image build process