Skip to content

Commit

Permalink
Merge pull request #606 from tas50/solaris
Browse files Browse the repository at this point in the history
Fix vagrant.sh failing on Solaris nodes
  • Loading branch information
Seth Thomas committed Jun 2, 2016
2 parents 6fdd2e4 + 626e20a commit 6743282
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
19 changes: 19 additions & 0 deletions scripts/solaris/vagrant.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/sh -eux

# set a default HOME_DIR environment variable if not set
HOME_DIR="${HOME_DIR:-/export/home/vagrant}";

pubkey_url="https://github.com/mitchellh/vagrant/master/keys/vagrant.pub";
mkdir -p $HOME_DIR/.ssh;
if command -v wget >/dev/null 2>&1; then
wget --no-check-certificate "$pubkey_url" -O $HOME_DIR/.ssh/authorized_keys;
elif command -v curl >/dev/null 2>&1; then
curl --insecure --location "$pubkey_url" > $HOME_DIR/.ssh/authorized_keys;
elif command -v fetch >/dev/null 2>&1; then
fetch -am -o $HOME_DIR/.ssh/authorized_keys "$pubkey_url";
else
echo "Cannot download vagrant public key";
exit 1;
fi
chown -R vagrant $HOME_DIR/.ssh;
chmod -R go-rwsx $HOME_DIR/.ssh;
4 changes: 2 additions & 2 deletions solaris-11-x86.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,15 @@
"scripts/common/metadata.sh",
"scripts/solaris/update.sh",
"scripts/solaris/vmtools.sh",
"scripts/common/vagrant.sh",
"scripts/solaris/vagrant.sh",
"scripts/solaris/minimize.sh"
],
"type": "shell"
}
],
"variables": {
"_DOWNLOAD_SITE": "http://www.oracle.com/technetwork/server-storage/solaris11/downloads/index.html",
"_README": "You must download the automated installer iso from the following page, and then place it somewhere that packer can fetch it",
"_README": "You must download the automated installer iso from the following page, and then place it in the packer_cache dir",
"arch": "64",
"box_basename": "solaris-11.3",
"build_timestamp": "{{isotime \"20060102150405\"}}",
Expand Down

0 comments on commit 6743282

Please sign in to comment.