summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAditya Kali <adityakali@users.noreply.github.com>2016-02-17 15:53:21 -0800
committerAditya Kali <adityakali@users.noreply.github.com>2016-02-17 15:53:21 -0800
commitfee610694037fca28926386624cf2b01240bb429 (patch)
tree158976d8a7671f35a1ef4a7721ef34099e2f107b
parent3dc069141873b389a442311115d57be04d0eab7a (diff)
downloadgoogle-compute-image-packages-fee610694037fca28926386624cf2b01240bb429.tar.gz
fix url for fetching instance id
The instance-id is accessible from URL "http://metadata.google.internal/computeMetadata/v1/instance/id" and not "http://metadata.google.internal/computeMetadata/v1/instance/instance-id".
-rwxr-xr-xgoogle-startup-scripts/usr/share/google/onboot2
1 files changed, 1 insertions, 1 deletions
diff --git a/google-startup-scripts/usr/share/google/onboot b/google-startup-scripts/usr/share/google/onboot
index b423a67..482d384 100755
--- a/google-startup-scripts/usr/share/google/onboot
+++ b/google-startup-scripts/usr/share/google/onboot
@@ -66,7 +66,7 @@ function get_metadata_value() {
}
function do_environment() {
- echo "INSTANCE_ID=$(get_metadata_value instance-id)" > ${GOOGLE_ENVIRONMENT}
+ echo "INSTANCE_ID=$(get_metadata_value id)" > ${GOOGLE_ENVIRONMENT}
}
function do_init() {