Commit 8a1708a2 authored by King Ho's avatar King Ho

Update importcustomattributes.sh

parent 5e7530d2
......@@ -2,6 +2,7 @@
curl "http://metadata.google.internal/computeMetadata/v1/instance/attributes/" -H "Metadata-Flavor: Google" > /var/metadatalist.txt
cat /var/metadatalist.txt | while read p
do
LINE=export "$p"=$(curl "http://metadata.google.internal/computeMetadata/v1/instance/attributes/$p" -H "Metadata-Flavor: Google")
LINE=export "$p"=$(curl "http://metadata.google.internal/computeMetadata/v1/instance/attributes/$p" -H "Metadata-Flavor: Google")
echo $LINE
grep -qFx -- "$LINE" /etc/profile || echo "$LINE" >> /etc/profile
done
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment