Commits

Johan Bakker  committed 430efa2

changed defaults to fit in agreed folder layout

  • Participants
  • Parent commits 99d8f22

Comments (0)

Files changed (1)

File bootstrap-puppet.sh

 # script : bootstrap-puppet.sh
 # Usage  : bootstrapping puppet
 # Author : Johan Bakker (jbakker@atlassian.com)
-VER=0.0.3
+VER=0.0.4
 
 usage() {
   echo "
      -y: Answers all questions with yes (this applies to installing ruby and creating folders)
      -C: Config folder (default set to SOFTWARE_ROOT/etc)
      -G: Rubygem version (defaults to 1.3.5)
-     -P: Puppet installation folder (default set to SOFTWARE_ROOT/puppet)
-     -S: Set software root folder (defaults to /sw-inf)
+     -P: Puppet installation folder (default set to SOFTWARE_ROOT/lib/puppet)
+     -S: Set software root folder (defaults to /sw)
      -W: Location to install the wrapper scripts to (default set to SOFTWARE_ROOT/bin)
   "
 }
 
 	if [ ! -x $WRAP_DIR/puppet ]; then
 	echo "#!/bin/sh
-export GEM_HOME=$SW_DIR/puppet
+export GEM_HOME=$PUP_DIR
 export RUBYLIB=$PUP_DIR/lib
 $PUP_DIR/bin/puppet \$* --confdir $CONF_DIR" > $WRAP_DIR/puppet
 	chmod +x $WRAP_DIR/puppet 
 done
 
 #vars
-SW_DIR=${SW_DIR:-"/sw-inf"}
+SW_DIR=${SW_DIR:-"/sw"}
 SW_DIR=`echo ${SW_DIR}|sed 's/\/$//'`; #Remove training slash
-PUP_DIR=${PUP_DIR:-"$SW_DIR/puppet"}
+PUP_DIR=${PUP_DIR:-"$SW_DIR/lib/puppet"}
 WRAP_DIR=${WRAP_DIR:-"$SW_DIR/bin"}
 CONF_DIR=${CONF_DIR:-"$SW_DIR/etc"}
 MANIFEST_DIR="$CONF_DIR/puppet/manifests"