@@ -34,6 +34,53 @@ set -e
34
34
BASEIMAGE_RELEASE=` cat /etc/hyperledger-baseimage-release`
35
35
DEVENV_REVISION=` (cd /hyperledger/devenv; git rev-parse --short HEAD)`
36
36
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
+
37
84
# Update system
38
85
apt-get update -qq
39
86
@@ -101,9 +148,6 @@ sudo chown -R vagrant:vagrant $GOPATH
101
148
# Update limits.conf to increase nofiles for RocksDB
102
149
sudo cp /hyperledger/devenv/limits.conf /etc/security/limits.conf
103
150
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
-
107
151
# configure vagrant specific environment
108
152
cat << EOF >/etc/profile.d/vagrant-devenv.sh
109
153
# Expose the devenv/tools in the $PATH
@@ -112,3 +156,9 @@ export VAGRANT=1
112
156
export CGO_CFLAGS=" "
113
157
export CGO_LDFLAGS="-lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy"
114
158
EOF
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