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:
parent
4e37eb815c
commit
4d85faffea
@ -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 "#!/"
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user