1
0
mirror of https://gitlab.alpinelinux.org/alpine/cloud/tiny-cloud.git synced 2025-12-15 11:22:43 +03:00

Fix user-data Decompression

This commit is contained in:
Jake Buchholz Göktürk 2022-10-20 23:52:52 +00:00
parent 4e37eb815c
commit 4d85faffea
3 changed files with 6 additions and 6 deletions

View File

@ -3,11 +3,6 @@
source /lib/tiny-cloud/init-common
match_header() {
local bytes=$(echo -en "$1")
[ "$bytes" = "$(dd bs=1 count=${#bytes} if="$2" 2>/dev/null)" ]
}
is_userdata_script() {
head -n1 "$TINY_CLOUD_VAR/user-data" | grep -q "#!/"
}

View File

@ -38,6 +38,11 @@ set_ssh_keys() {
imds @ssh-keys > "$keys_file"
}
match_header() {
local bytes=$(echo -en "$1")
[ "$bytes" = "$(dd bs=1 count=${#bytes} if="$2" 2>/dev/null)" ]
}
save_userdata() {
skip_action save_userdata && return

View File

@ -7,7 +7,7 @@
source /lib/tiny-cloud/common
[ "${IFACE:=unknown}" = unknown ] && log -s crit "IFACE not set, aborting"
[ -z "${IFACE}" ] && log -s crit "IFACE not set, aborting"
# kill interface's imds-net-sync daemon
[ "$1" = '-k' ] && PHASE=pre-down && shift