summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorScott Moser <smoser@brickies.net>2017-02-23 17:13:52 -0500
committerScott Moser <smoser@brickies.net>2017-02-24 22:46:42 -0500
commite0efe853b805ca3c66155b7307a67af5175b3f46 (patch)
tree1cdb4ff505e19c6ec70515c2a11eb17dd4a5a295 /tools
parentcff1335be979fd1be5512d241ab861cfe70d82f0 (diff)
downloadvyos-cloud-init-e0efe853b805ca3c66155b7307a67af5175b3f46.tar.gz
vyos-cloud-init-e0efe853b805ca3c66155b7307a67af5175b3f46.zip
tools/ds-identify: read the seed directory on Ec2
This just adds checking of the Ec2 seed directory.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/ds-identify5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/ds-identify b/tools/ds-identify
index f2878745..c15ba5c0 100755
--- a/tools/ds-identify
+++ b/tools/ds-identify
@@ -592,8 +592,11 @@ dscheck_Bigstep() {
dscheck_Ec2() {
# http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/identify_ec2_instances.html
# http://paste.ubuntu.com/23630859/
- local uuid="" hvuuid="$PATH_ROOT/sys/hypervisor/uuid"
+
+ check_seed_dir "ec2" meta-data user-data && return ${DS_FOUND}
is_container && return ${DS_NOT_FOUND}
+
+ local uuid="" hvuuid="$PATH_ROOT/sys/hypervisor/uuid"
# if the (basically) xen specific /sys/hypervisor/uuid starts with 'ec2'
if [ -r "$hvuuid" ] && read uuid < "$hvuuid" &&
[ "${uuid#ec2}" != "$uuid" ]; then