diff --git a/build b/build index 51481fc..61ee2af 100755 --- a/build +++ b/build @@ -6,6 +6,7 @@ REPO_PATH="${ORG_PATH}/cloudinit" export GOBIN=${PWD}/bin export GOPATH=${PWD}/third_party export CGO_ENABLED=0 +mkdir -p $GOBIN if [ ! -h $GOPATH/src/${REPO_PATH} ]; then mkdir -p $GOPATH/src/${ORG_PATH} @@ -13,6 +14,6 @@ if [ ! -h $GOPATH/src/${REPO_PATH} ]; then fi for os in linux freebsd; do - GOOS=${os} go build -x -a -installsuffix cgo -o bin/cloudinit-linux-x86_64 ${REPO_PATH} - GOOS=${os} GOARCH=386 go build -x -a -installsuffix cgo -o bin/cloudinit-linux-x86_32 ${REPO_PATH} + GOOS=${os} go build -x -a -installsuffix cgo -o bin/cloudinit-${os}-x86_64 ${REPO_PATH} + GOOS=${os} GOARCH=386 go build -x -a -installsuffix cgo -o bin/cloudinit-${os}-x86_32 ${REPO_PATH} done diff --git a/datasource/metadata/openstack/metadata.go b/datasource/metadata/openstack/metadata.go index d7a1852..87d3001 100644 --- a/datasource/metadata/openstack/metadata.go +++ b/datasource/metadata/openstack/metadata.go @@ -18,7 +18,6 @@ package openstack import ( "encoding/json" - "log" "net" "strconv" @@ -99,7 +98,7 @@ func (ms *metadataService) FetchMetadata() (metadata datasource.Metadata, err er metadata.PrivateIPv6 = net.ParseIP(m.Interfaces.Private[0].IPv6.IPAddress) } } - log.Printf("aaa %+v\n", m) + metadata.Hostname = m.Hostname metadata.SSHPublicKeys = map[string]string{} metadata.SSHPublicKeys[strconv.Itoa(0)] = m.PublicKeys["root"]