From 0bac32811b96dfc41be0dc36ba6de6e81fb26874 Mon Sep 17 00:00:00 2001 From: Chris McClimans Date: Wed, 4 Jan 2012 11:26:23 +1300 Subject: [PATCH] [TEMPLATE-UPDATE] postinstall.sh grabs 7zip instead of daemon utils --- templates/windows-2008-amd64/postinstall.sh | 69 +++++++++------------ 1 file changed, 28 insertions(+), 41 deletions(-) diff --git a/templates/windows-2008-amd64/postinstall.sh b/templates/windows-2008-amd64/postinstall.sh index cc4eca79..f2b293d8 100644 --- a/templates/windows-2008-amd64/postinstall.sh +++ b/templates/windows-2008-amd64/postinstall.sh @@ -17,30 +17,16 @@ wget http://apt-cyg.googlecode.com/svn/trunk/apt-cyg chmod +x apt-cyg mv apt-cyg /usr/local/bin/ -# Download Daemontools Lite -# This needs some fixing as the url seems to change every X time ... -#wget http://www.daemon-tools.cc/eng/downloads/dtproAdv -#cat http://www.daemon-tools.cc/eng/downloads/dtLite|grep
-URL=$(curl -L http://www.daemon-tools.cc/eng/downloads/dtLite|grep http|grep exe|cut -d '"' -f 4) -curl -L $URL -o daemontools.exe - -#curl -L http://disc-tools.com/request?p=70e5b112a42060a5439c5edec8e4f8c3/DTLite4402-0131.exe -o daemontools.exe -chmod +x daemontools.exe - -# Silent install Daemontools -# http://www.daemon-help.com/en/installation_notes_lite/installation_lite.html -# Silent install - http://forum.daemon-tools.cc/f24/dt-4-08-a-15030/ -./daemontools.exe /S +# 7zip will allow us to extract a file from an ISO +wget http://downloads.sourceforge.net/sevenzip/7z920-x64.msi +msiexec /qb /i 7z920-x64.msi # Download Virtualbox Additions -VBOX_VERSION="4.0.8" +VBOX_VERSION="4.1.8" #"4.0.8" wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso -# Mount iso file -# http://www.daemon-help.com/en/windows_integration_lite/command_line_parameters.html -# /cygdrive/c/Program Files (x86)/DAEMON Tools Pro -cd "/cygdrive/c/Program Files (x86)/DAEMON Tools Lite" -./DTLite.exe -mount 0,"c:\cygwin\home\vagrant\VBoxGuestAdditions_4.0.8.iso" +# Extract the installer from the ISO (WHY WHY WHY isn't this available not bundled inside an ISO) +7z.exe x VBoxGuestAdditions_$VBOX_VERSION.iso VBoxWindowsAdditions-amd64.exe # Mark Oracle as a trusted installer #http://blogs.msdn.com/b/steverac/archive/2009/07/09/adding-certificates-to-the-local-certificates-store-and-setting-local-policy-using-a-command-line-system-center-updates-publisher-example.aspx @@ -48,14 +34,13 @@ cd "/cygdrive/c/Program Files (x86)/DAEMON Tools Lite" certutil -addstore -f "TrustedPublisher" a:oracle-cert.cer # Install the Virtualbox Additions -cd /cygdrive/e ./VBoxWindowsAdditions.exe /S -#http://www.msfn.org/board/topic/105277-howto-create-a-fully-up-to-date-xp-x64-dvd/ -# Unmount ISO file -cd "/cygdrive/c/Program Files (x86)/DAEMON Tools Lite" -./DTLite.exe -unmount 0 +curl -L http://www.opscode.com/chef/install.msi -o chef-client-latest.msi +msiexec /qb /i chef-client-latest.msi + +#http://www.msfn.org/board/topic/105277-howto-create-a-fully-up-to-date-xp-x64-dvd/ # Next step is get ruby working # But thanks to opscode's work , that should not be an issue @@ -67,41 +52,43 @@ cd /home/vagrant # Ruby 1.9 #wget http://rubyforge.org/frs/download.php/74298/rubyinstaller-1.9.2-p180.exe -O rubyinstaller.exe # Ruby 1.8 -wget http://files.rubyforge.vm.bytemark.co.uk/rubyinstaller/rubyinstaller-1.8.7-p334.exe -O rubyinstaller.exe +##wget http://files.rubyforge.vm.bytemark.co.uk/rubyinstaller/rubyinstaller-1.8.7-p334.exe -O rubyinstaller.exe -chmod +x rubyinstaller.exe -./rubyinstaller.exe /verysilent /dir="C:\ruby" /tasks="assocfiles,modpath" /SUPPRESSMSGBOXES +#chmod +x rubyinstaller.exe +#./rubyinstaller.exe /verysilent /dir="C:\ruby" /tasks="assocfiles,modpath" /SUPPRESSMSGBOXES # Now add it to the path cmd, and cygwin path # http://serverfault.com/questions/63017/how-do-i-modify-the-system-path-in-windows-2003-windows-2008-using-a-script -/cygdrive/c/Windows/System32/setx.exe PATH "c:\windows\system32;c:\ruby\bin" /M -export PATH=$PATH:/cygdrive/c/ruby/bin +##/cygdrive/c/Windows/System32/setx.exe PATH "c:\windows\system32;c:\ruby\bin" /M +##export PATH=$PATH:/cygdrive/c/ruby/bin # Install Ruby dev kit (native extensions) -mkdir /cygdrive/c/devkit -cd /cygdrive/c/devkit -wget --no-check-certificate http://github.com/downloads/oneclick/rubyinstaller/DevKit-tdm-32-4.5.1-20101214-1400-sfx.exe -O rubydevkit.exe -chmod +x rubydevkit.exe -./rubydevkit -y -ruby dk.rb init -ruby dk.rb install +##mkdir /cygdrive/c/devkit +##cd /cygdrive/c/devkit +##wget --no-check-certificate http://github.com/downloads/oneclick/rubyinstaller/DevKit-tdm-32-4.5.1-20101214-1400-sfx.exe -O rubydevkit.exe +##chmod +x rubydevkit.exe +##./rubydevkit -y +##ruby dk.rb init +##ruby dk.rb install # Installing puppet -gem.bat install puppet --no-rdoc --no-ri --verbose +##gem.bat install puppet --no-rdoc --no-ri --verbose # Installing chef required gems on windows # For ruby 1.8 -gem.bat install win32-open3 ruby-wmi windows-api windows-pr --no-rdoc --no-ri --verbose +##gem.bat install win32-open3 ruby-wmi windows-api windows-pr --no-rdoc --no-ri --verbose # For ruby 1.9 #gem.bat install win32-open3 rdp-ruby-wmi windows-api windows-pr --no-rdoc --no-ri --verbose # Install chef -gem.bat install ohai --no-rdoc --no-ri --verbose -gem.bat install chef --no-rdoc --no-ri --verbose +##gem.bat install ohai --no-rdoc --no-ri --verbose +##gem.bat install chef --no-rdoc --no-ri --verbose # Currently 1.9 ruby + chef 10 doesn't seem to be able to #http://stackoverflow.com/questions/4819807/ohai-fails-to-determine-os-version-in-cygwin + + #Making aliases cat < /home/vagrant/.bash_profile alias chef-client="chef-client.bat"