Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if TTY is present before invoking mesg #67

Closed
wants to merge 1 commit into from

Conversation

tnation14
Copy link
Contributor

Overview

When provisioning VMs, users see an error that says stdin: not a tty. This error is an instance of hashicorp/vagrant#1673, and stems from the fact that the bash profile for Ubuntu's root user runs mesg n without checkking to see if a TTY is present (see this comment on the issue for more detail). This PR Implements this fix, which adds a line to /root/.profile to check to see if a TTY is present before invoking mesg.

Fixes #66

Testing

Run vagrant provision, ensure that the stdin: not a tty error is not present.

Removes error message "stdin is not a tty" when provisioning VM.
@tnation14 tnation14 force-pushed the feature/tnation/vagrant-login-shell branch from fc5140a to 8aed856 Compare June 12, 2017 13:22
@hectcastro
Copy link
Contributor

I don't necessarily think that we need to merge this in. The issue summary signals that this isn't something that causes a problem, so I think we're OK with knowing that and living with the message. It is possible that Rob saw it at the end of the output and thought it halted further provisioning.

As another side-note, I have the following version of Vagrant on a Mac and was unable to reproduce:

athena Projects/geotrellis-site ‹master› » vagrant -v
Vagrant 1.9.5
athena Projects/geotrellis-site ‹master› » git rev-parse --short HEAD
f046bb4

@lossyrob
Copy link
Contributor

lossyrob commented Jun 12, 2017

Ok, apologies if this was a red herring - the only output from the provisioning step of the script is this line in a red line, so I assumed it failed (see below)

screen shot 2017-06-12 at 10 21 59 am

I'll continue assuming it didn't fail and raise any problems here or on the related issue.

@hectcastro
Copy link
Contributor

Na, it is a legit issue that has sent me down rabbit holes in the past. In the end, I think the solution has potential to cause confusion, and the error itself is harmless. My point about not being able to reproduce it suggests that maybe things were patched up in the Vagrant internals.

@tnation14 tnation14 closed this Jun 14, 2017
@hectcastro hectcastro deleted the feature/tnation/vagrant-login-shell branch November 29, 2017 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Getting "stdin: is not a tty" error on setup
3 participants