@@ -63,6 +63,7 @@ struct cloud_struct {
6363 char * ip ;
6464 uint16_t port ;
6565 char * request_sshkey_path ;
66+ char * request_hostname_path ;
6667 char * request_userdata_path ;
6768 char * cloud_config_header ;
6869};
@@ -74,6 +75,7 @@ static struct cloud_struct config[MAX_CONFIGS] = {
7475 "169.254.169.254" ,
7576 80 ,
7677 "/latest/meta-data/public-keys/0/openssh-key" ,
78+ "/latest/meta-data/hostname" ,
7779 "/latest/user-data" ,
7880 "#cloud-config\n" \
7981 "users:\n" \
@@ -87,6 +89,7 @@ static struct cloud_struct config[MAX_CONFIGS] = {
8789 80 ,
8890 "/opc/v1/instance/metadata/ssh_authorized_keys" ,
8991 NULL ,
92+ NULL ,
9093 "#cloud-config\n" \
9194 "users:\n" \
9295 " - name: opc\n" \
@@ -100,6 +103,7 @@ static struct cloud_struct config[MAX_CONFIGS] = {
100103 80 ,
101104 "/latest/meta-data/public-keys/0/openssh-key" ,
102105 NULL ,
106+ NULL ,
103107 "#cloud-config\n" \
104108 "users:\n" \
105109 " - name: tencent\n" \
@@ -112,6 +116,7 @@ static struct cloud_struct config[MAX_CONFIGS] = {
112116 80 ,
113117 "/latest/meta-data/public-keys/0/openssh-key" ,
114118 NULL ,
119+ NULL ,
115120 "#cloud-config\n" \
116121 "users:\n" \
117122 " - name: aliyun\n" \
@@ -123,6 +128,7 @@ static struct cloud_struct config[MAX_CONFIGS] = {
123128 "metadata.platformequinix.com" ,
124129 80 ,
125130 "/2009-04-04/meta-data/public-keys" ,
131+ "/2009-04-04/meta-data/hostname" ,
126132 "/userdata" ,
127133 "#cloud-config\n" \
128134 "users:\n" \
@@ -135,6 +141,7 @@ static struct cloud_struct config[MAX_CONFIGS] = {
135141 "127.0.0.254" ,
136142 8123 ,
137143 "/public-keys" ,
144+ "/hostname" ,
138145 "/user-data" ,
139146 "#cloud-config\n" \
140147 "users:\n" \
0 commit comments