Skip to content

Instantly share code, notes, and snippets.

@kmmbvnr
Created January 13, 2016 07:45
Show Gist options
  • Save kmmbvnr/1c4f8e1fc66502e52513 to your computer and use it in GitHub Desktop.
Save kmmbvnr/1c4f8e1fc66502e52513 to your computer and use it in GitHub Desktop.
# Fix no-tty error
# if there a line that only consists of 'mesg n' in /root/.profile, replace it with 'tty -s && mesg n'
config.vm.provision :shell,
:inline => "(grep -q -E '^mesg n$' /root/.profile && sed -i 's/^mesg n$/tty -s \\&\\& mesg n/g' /root/.profile && echo 'Ignore the previous error about stdin not being a tty. Fixing it now...') || exit 0;"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment