Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Greenpeace Public Access
Google Custom Attributes to Environment Variables
Commits
1e1a0add
Commit
1e1a0add
authored
Feb 05, 2021
by
King Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update importcustomattributes.sh
parent
f1150d83
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
importcustomattributes.sh
importcustomattributes.sh
+1
-1
No files found.
importcustomattributes.sh
View file @
1e1a0add
...
...
@@ -2,7 +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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment