BryanDavis has uploaded a new change for review.
https://gerrit.wikimedia.org/r/120481
Change subject: Stop 'stdin: is not a tty' complaints
......................................................................
Stop 'stdin: is not a tty' complaints
Change the shell command used by vagrant when communicating with the VM
from the default `bash -l` to `bash -c 'BASH_ENV=/etc/profile exec
bash'`. This bypasses the /root/.profile script containing the unguarded
`mesg -n` command which triggers the error message.
This work around is slightly superior to the prior solution of editing
the mesg invocation out of /root/.profile as it takes effect prior to
the initial puppet run.
Change-Id: I635882877e8bbf11599d687e79f82d80a729d213
---
M Vagrantfile
M puppet/modules/misc/manifests/init.pp
2 files changed, 4 insertions(+), 9 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant
refs/changes/81/120481/1
diff --git a/Vagrantfile b/Vagrantfile
index c5f7c25..fdecff7 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -47,6 +47,10 @@
config.vm.box_download_insecure = true
end
+ # Stop all of the 'stdin: is not a tty' complaints during provisioning
+ # See https://github.com/mitchellh/vagrant/issues/1673
+ config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"
+
config.vm.network :private_network,
ip: '10.11.12.13'
diff --git a/puppet/modules/misc/manifests/init.pp
b/puppet/modules/misc/manifests/init.pp
index 0dc67f3..054401c 100644
--- a/puppet/modules/misc/manifests/init.pp
+++ b/puppet/modules/misc/manifests/init.pp
@@ -5,15 +5,6 @@
# command-line tools, like 'ack' and 'curl'.
#
class misc {
- # This solves the 'stdin: not a tty' error message, which is caused
- # by a call to 'mesg n' in /root/.profile. Sadly it'll still appear
- # once, since profile is sourced before Puppet can run. That sucks,
- # because first impressions do count. Fix it and you get a cookie.
- exec { 'update profile':
- command => 'sed -i -e "s/^mesg n/tty -s \&\& mesg n/" /root/.profile',
- onlyif => 'grep -q "^mesg n" /root/.profile',
- }
-
if $::provider_name == 'virtualbox' {
class { 'virtualbox': }
}
--
To view, visit https://gerrit.wikimedia.org/r/120481
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I635882877e8bbf11599d687e79f82d80a729d213
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: BryanDavis <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits