Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am running Ubuntu 12.04 LTS in an openVZ container under Proxmox 2.x

I noticed that on reboots, Postgres was not starting. Some short searches revealed that I need to change a few lines in /etc/init/tty1.conf

The changes required me to change the document

FROM THIS:

# tty1 - getty
#
# This service maintains a getty on tty1 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]

respawn
exec /sbin/getty -8 38400 tty1

TO THIS:

# tty1 - getty
#
# This service maintains a getty on tty1 from the point the system is
# started until it is shut down again.

start on stopped rc RUNLEVEL=[2345]

stop on runlevel [!2345]

respawn
exec /sbin/getty -8 38400 tty1

How could this have solved Postgres starting automatically at boot time? What exactly did the removal of those lines do?

share|improve this question

1 Answer 1

The changes in the configuration file changes the conditions for starting the getty(8) service., which is a "driver" for the tty terminal login.

The syntaxis respond to upstart for job/services, in this case tty1.

The lines removed changed the conditions for starting the getty on the tty1 terminal, which is in proxmox the Console access via the Java applet (I don't have so much information since in only know Proxmox 3 interface).

The proxmox ubuntu template has no login in the console because the instance is a container and is not a lxc container as requires the default tty1.conf file.

You may check the presence of Console login with and wothout the modifications.

I don't know Postgres, but it probably requires console login or agetty in therminal tty1.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.