mirror of
https://gitlab.alpinelinux.org/alpine/cloud/tiny-cloud.git
synced 2025-12-14 19:02:45 +03:00
Use grep -E instead of egrep
This commit is contained in:
parent
2713aac43f
commit
e402fe63e7
@ -15,7 +15,7 @@ _imds_header() {
|
||||
}
|
||||
|
||||
_imds_ssh_keys() {
|
||||
_imds "$IMDS_SSH_KEYS" | sed 's/"/\n/g' | egrep -v '(\[|\]|,)' | sort -u
|
||||
_imds "$IMDS_SSH_KEYS" | sed 's/"/\n/g' | grep -E -v '(\[|\]|,)' | sort -u
|
||||
}
|
||||
|
||||
_imds_userdata() {
|
||||
|
||||
@ -10,7 +10,7 @@ IMDS_LOCAL_HOSTNAME="$IMDS_HOSTNAME"
|
||||
IMDS_SSH_KEYS="SSH_PUBLIC_KEYS_[0-9]+_KEY"
|
||||
|
||||
_imds() {
|
||||
wget --quiet --timeout 1 --output-document - "http://$IMDS_ENDPOINT/$IMDS_URI$IMDS_QUERY" | egrep "^${1}=" | cut -d'=' -f2
|
||||
wget --quiet --timeout 1 --output-document - "http://$IMDS_ENDPOINT/$IMDS_URI$IMDS_QUERY" | grep -E "^${1}=" | cut -d'=' -f2
|
||||
}
|
||||
|
||||
_imds_ssh_keys() {
|
||||
|
||||
@ -106,8 +106,9 @@ imds_local_hostname_oci_body() { check_local_hostname oci; }
|
||||
imds_local_hostname_scaleway_body() {
|
||||
fake_metadata scaleway <<-EOF
|
||||
HOSTNAME=myhostname
|
||||
FOO=bar
|
||||
EOF
|
||||
CLOUD="scaleway" atf_check -o match:"myhostname" imds @local-hostname
|
||||
CLOUD="scaleway" atf_check -o match:"^myhostname$" imds @local-hostname
|
||||
}
|
||||
imds_local_hostname_hetzner_body() { check_local_hostname hetzner; }
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user