Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix vagrant.sh failing on Solaris nodes #606

Merged
merged 1 commit into from
Jun 2, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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