jenkins-bot has submitted this change and it was merged.

Change subject: Fix 'stdin: is not a tty'
......................................................................


Fix 'stdin: is not a tty'

Changes in Ib00295e tried to move the profile correction code to
/etc/profile.d/mediawiki-vagrant, but apparently that script isn't
sourced in the execution path taken by the root shell that Vagrant uses
to run Puppet commands.

Change-Id: I55c6b69bdc6d97cec2b652bd1424153970a75bd0
---
M puppet/modules/misc/manifests/init.pp
1 file changed, 8 insertions(+), 1 deletion(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/puppet/modules/misc/manifests/init.pp 
b/puppet/modules/misc/manifests/init.pp
index c989126..9d22ddd 100644
--- a/puppet/modules/misc/manifests/init.pp
+++ b/puppet/modules/misc/manifests/init.pp
@@ -5,7 +5,6 @@
 # command-line tools, like 'ack' and 'curl'.
 #
 class misc {
-    # file { [ '/root/.profile', '/home/vagrant/.profile' ]: content => '[ -n 
"$BASH_VERSION" -a -f "$HOME/.bashrc" ]', }
 
     file { '/etc/profile.d':
         ensure  => directory,
@@ -32,4 +31,12 @@
         require => Package['ack-grep'],
         source  => 'puppet:///modules/misc/ackrc',
     }
+
+    # Fix the 'stdin: not a tty' error message caused by the Ubuntu root
+    # user's bash profile.
+    # See https://github.com/mitchellh/vagrant/issues/1673
+    exec { 'fix root profile':
+      command => 'sed -i -e "s/^mesg n/tty -s \&\& mesg n/" /root/.profile',
+      onlyif  => 'grep -q "^mesg n" /root/.profile',
+    }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/144415
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I55c6b69bdc6d97cec2b652bd1424153970a75bd0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: BryanDavis <[email protected]>
Gerrit-Reviewer: Dduvall <[email protected]>
Gerrit-Reviewer: MaxSem <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to