@@ -34,6 +34,53 @@ set -e
3434BASEIMAGE_RELEASE=` cat /etc/hyperledger-baseimage-release`
3535DEVENV_REVISION=` (cd /hyperledger/devenv; git rev-parse --short HEAD)`
3636
37+ # Install WARNING before we start provisioning so that it
38+ # will remain active. We will remove the warning after
39+ # success
40+ cat << EOF >/etc/motd
41+ ##########################################################
42+ ,.-""` ` ""-.,
43+ / ,:,;;,;, \ DANGER DANGER
44+ \ ';';;';' / WILL ROBINSON...
45+ ` ' ---;;---' `
46+ <>_==""==_<>
47+ _<<<<<>>>>>_
48+ .'____\==/____'.
49+ _____|__ |__| __|______
50+ /C \\\\\\\\ |..| //////// C\
51+ \_C//////// |;;| \\\\\\\\ C_/
52+ |____o|##|o____|
53+ \ ___|~~|___ /
54+ '>--------<'
55+ {==_==_==_=}
56+ {= -=_=-_==}
57+ {=_=-}{=-=_}
58+ {=_==}{-=_=}
59+ }~~~~""~~~~{
60+ jgs }____::____{
61+ /` || ` \
62+ | || |
63+ | || |
64+ | || |
65+ '-----''-----'
66+ ##########################################################
67+
68+ If you see this notice, it means that something is wrong
69+ with your hyperledger/fabric development environment.
70+
71+ Typically this indicates that something failed during
72+ provisioning and your environment is incomplete. Builds,
73+ execution, etc., may not operate as they were intended.
74+ Please review the provisioning log and visit:
75+
76+ https://goo.gl/yqjRC7
77+
78+ for more information on troubleshooting and solutions.
79+
80+ ##########################################################
81+ EOF
82+
83+
3784# Update system
3885apt-get update -qq
3986
@@ -101,9 +148,6 @@ sudo chown -R vagrant:vagrant $GOPATH
101148# Update limits.conf to increase nofiles for RocksDB
102149sudo cp /hyperledger/devenv/limits.conf /etc/security/limits.conf
103150
104- # Set our shell prompt to something less ugly than the default from packer
105- echo " PS1=\" \u@hyperledger-devenv:v$BASEIMAGE_RELEASE -$DEVENV_REVISION :\w$ \" " >> /home/vagrant/.bashrc
106-
107151# configure vagrant specific environment
108152cat << EOF >/etc/profile.d/vagrant-devenv.sh
109153# Expose the devenv/tools in the $PATH
@@ -112,3 +156,9 @@ export VAGRANT=1
112156export CGO_CFLAGS=" "
113157export CGO_LDFLAGS="-lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy"
114158EOF
159+
160+ # Set our shell prompt to something less ugly than the default from packer
161+ echo " PS1=\" \u@hyperledger-devenv:v$BASEIMAGE_RELEASE -$DEVENV_REVISION :\w$ \" " >> /home/vagrant/.bashrc
162+
163+ # finally, remove our warning so the user knows this was successful
164+ rm /etc/motd
0 commit comments