| 
				
			 | 
			
			
				@@ -117,25 +117,6 @@ function mesh_install_nodejs { 
			 | 
		
	
		
			
			| 
				117
			 | 
			
				117
			 | 
			
			
				         exit 7235728 
			 | 
		
	
		
			
			| 
				118
			 | 
			
				118
			 | 
			
			
				     fi 
			 | 
		
	
		
			
			| 
				119
			 | 
			
				119
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				120
			 | 
			
				
			 | 
			
			
				-    #$mesh_install_nodejs_prefix wget https://www.npmjs.com/install.sh -O /root/npm_install.sh 
			 | 
		
	
		
			
			| 
				121
			 | 
			
				
			 | 
			
			
				-    #if [ ! -f $rootdir/root/npm_install.sh ]; then 
			 | 
		
	
		
			
			| 
				122
			 | 
			
				
			 | 
			
			
				-    #    echo $'Unable to download npm installer' 
			 | 
		
	
		
			
			| 
				123
			 | 
			
				
			 | 
			
			
				-    #    exit 8793636 
			 | 
		
	
		
			
			| 
				124
			 | 
			
				
			 | 
			
			
				-    #fi 
			 | 
		
	
		
			
			| 
				125
			 | 
			
				
			 | 
			
			
				-    #if ! grep -q "t=\"\${npm_install}\"" $rootdir/root/npm_install.sh; then 
			 | 
		
	
		
			
			| 
				126
			 | 
			
				
			 | 
			
			
				-    #    echo $'Unable to set npm version within npm_install.sh' 
			 | 
		
	
		
			
			| 
				127
			 | 
			
				
			 | 
			
			
				-    #    exit 629052 
			 | 
		
	
		
			
			| 
				128
			 | 
			
				
			 | 
			
			
				-    #fi 
			 | 
		
	
		
			
			| 
				129
			 | 
			
				
			 | 
			
			
				-    #$mesh_install_nodejs_prefix chmod +x /root/npm_install.sh 
			 | 
		
	
		
			
			| 
				130
			 | 
			
				
			 | 
			
			
				-    #$mesh_install_nodejs_prefix sed -i "s|t=\"\${npm_install}\"|t=\"$NPM_VERSION\"|g" /root/npm_install.sh 
			 | 
		
	
		
			
			| 
				131
			 | 
			
				
			 | 
			
			
				-    #$mesh_install_nodejs_prefix /root/npm_install.sh 
			 | 
		
	
		
			
			| 
				132
			 | 
			
				
			 | 
			
			
				-    # 
			 | 
		
	
		
			
			| 
				133
			 | 
			
				
			 | 
			
			
				-    #if [ ! -f $rootdir/usr/bin/npm ]; then 
			 | 
		
	
		
			
			| 
				134
			 | 
			
				
			 | 
			
			
				-    #    echo $'npm was not installed' 
			 | 
		
	
		
			
			| 
				135
			 | 
			
				
			 | 
			
			
				-    #    exit 5290462 
			 | 
		
	
		
			
			| 
				136
			 | 
			
				
			 | 
			
			
				-    #fi 
			 | 
		
	
		
			
			| 
				137
			 | 
			
				
			 | 
			
			
				-    #cp $rootdir/usr/bin/npm $rootdir/root/npm 
			 | 
		
	
		
			
			| 
				138
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				139
			 | 
			
				120
			 | 
			
			
				     get_npm_arch 
			 | 
		
	
		
			
			| 
				140
			 | 
			
				121
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				141
			 | 
			
				122
			 | 
			
			
				     $mesh_install_nodejs_prefix npm config set unsafe-perm true 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -226,48 +207,7 @@ function install_nodejs { 
			 | 
		
	
		
			
			| 
				226
			 | 
			
				207
			 | 
			
			
				     rootdir= 
			 | 
		
	
		
			
			| 
				227
			 | 
			
				208
			 | 
			
			
				     mesh_install_nodejs 
			 | 
		
	
		
			
			| 
				228
			 | 
			
				209
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				229
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				230
			 | 
			
				
			 | 
			
			
				-    #if [ ! -f /usr/bin/nodejs ]; then 
			 | 
		
	
		
			
			| 
				231
			 | 
			
				
			 | 
			
			
				-    #    wget -qO- https://deb.nodesource.com/gpgkey/nodesource.gpg.key > /root/node.gpg.key 
			 | 
		
	
		
			
			| 
				232
			 | 
			
				
			 | 
			
			
				-    #    apt-key add /root/node.gpg.key 
			 | 
		
	
		
			
			| 
				233
			 | 
			
				
			 | 
			
			
				-    #    echo "deb https://deb.nodesource.com/node_6.x stretch main" > /etc/apt/sources.list.d/nodesource.list 
			 | 
		
	
		
			
			| 
				234
			 | 
			
				
			 | 
			
			
				-    #    echo "deb-src https://deb.nodesource.com/node_6.x stretch main" >> /etc/apt/sources.list.d/nodesource.list 
			 | 
		
	
		
			
			| 
				235
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				236
			 | 
			
				
			 | 
			
			
				-    #    apt-get update 
			 | 
		
	
		
			
			| 
				237
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				238
			 | 
			
				
			 | 
			
			
				-    #    apt-get -yq remove --purge nodejs 
			 | 
		
	
		
			
			| 
				239
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				240
			 | 
			
				
			 | 
			
			
				-    #    if [ -d /usr/local/lib/node_modules ]; then 
			 | 
		
	
		
			
			| 
				241
			 | 
			
				
			 | 
			
			
				-    #        rm -rf /usr/local/lib/node_modules 
			 | 
		
	
		
			
			| 
				242
			 | 
			
				
			 | 
			
			
				-    #    fi 
			 | 
		
	
		
			
			| 
				243
			 | 
			
				
			 | 
			
			
				-    #    if [ -f /usr/local/bin/node ]; then 
			 | 
		
	
		
			
			| 
				244
			 | 
			
				
			 | 
			
			
				-    #        rm /usr/local/bin/node 
			 | 
		
	
		
			
			| 
				245
			 | 
			
				
			 | 
			
			
				-    #    fi 
			 | 
		
	
		
			
			| 
				246
			 | 
			
				
			 | 
			
			
				-    #    if [ -f /usr/bin/node ]; then 
			 | 
		
	
		
			
			| 
				247
			 | 
			
				
			 | 
			
			
				-    #        rm /usr/bin/node 
			 | 
		
	
		
			
			| 
				248
			 | 
			
				
			 | 
			
			
				-    #    fi 
			 | 
		
	
		
			
			| 
				249
			 | 
			
				
			 | 
			
			
				-    #    if [ -f /usr/bin/nodejs ]; then 
			 | 
		
	
		
			
			| 
				250
			 | 
			
				
			 | 
			
			
				-    #        rm /usr/bin/nodejs 
			 | 
		
	
		
			
			| 
				251
			 | 
			
				
			 | 
			
			
				-    #    fi 
			 | 
		
	
		
			
			| 
				252
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				253
			 | 
			
				
			 | 
			
			
				-    #    apt-get -yq install nodejs 
			 | 
		
	
		
			
			| 
				254
			 | 
			
				
			 | 
			
			
				-    #    apt-get -yq install curl 
			 | 
		
	
		
			
			| 
				255
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				256
			 | 
			
				
			 | 
			
			
				-    #    if [ ! -f /usr/bin/nodejs ]; then 
			 | 
		
	
		
			
			| 
				257
			 | 
			
				
			 | 
			
			
				-    #        echo $'nodejs was not installed' 
			 | 
		
	
		
			
			| 
				258
			 | 
			
				
			 | 
			
			
				-    #        exit 63962 
			 | 
		
	
		
			
			| 
				259
			 | 
			
				
			 | 
			
			
				-    #    fi 
			 | 
		
	
		
			
			| 
				260
			 | 
			
				
			 | 
			
			
				-    #fi 
			 | 
		
	
		
			
			| 
				261
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				262
			 | 
			
				
			 | 
			
			
				-    #npm install -g npm@${NPM_VERSION} --save 
			 | 
		
	
		
			
			| 
				263
			 | 
			
				
			 | 
			
			
				-    #npm install -g n@${NODEJS_N_VERSION} --save 
			 | 
		
	
		
			
			| 
				264
			 | 
			
				
			 | 
			
			
				-    #n ${NODEJS_VERSION} 
			 | 
		
	
		
			
			| 
				265
			 | 
			
				
			 | 
			
			
				-    #npm install -g pug@2.0.0-beta6 --save 
			 | 
		
	
		
			
			| 
				266
			 | 
			
				
			 | 
			
			
				-    #npm install -g graceful-fs@4.1.10 --save 
			 | 
		
	
		
			
			| 
				267
			 | 
			
				
			 | 
			
			
				-    #npm install -g minimatch@3.0.3 --save 
			 | 
		
	
		
			
			| 
				268
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				269
			 | 
			
				
			 | 
			
			
				-    # node seems tricky so here we're going to double check 
			 | 
		
	
		
			
			| 
				270
			 | 
			
				
			 | 
			
			
				-    # that the versions we expect did get installed 
			 | 
		
	
		
			
			| 
				
			 | 
			
				210
			 | 
			
			
				+    # verify nodejs versions are what we expect 
			 | 
		
	
		
			
			| 
				271
			 | 
			
				211
			 | 
			
			
				     CURR_NODE_VERSION=$(node --version) 
			 | 
		
	
		
			
			| 
				272
			 | 
			
				212
			 | 
			
			
				     CURR_NPM_VERSION=$(npm --version) 
			 | 
		
	
		
			
			| 
				273
			 | 
			
				213
			 | 
			
			
				     CURR_N_VERSION=$(n --version) 
			 |