mirror of
https://gitlab.alpinelinux.org/alpine/cloud/tiny-cloud.git
synced 2025-12-16 03:42:44 +03:00
* fix imds nocloud file dump
* remove more debug stuff
This commit is contained in:
parent
d202c072b6
commit
24e36938c2
@ -3,9 +3,6 @@
|
|||||||
|
|
||||||
source /lib/tiny-cloud/init-common
|
source /lib/tiny-cloud/init-common
|
||||||
|
|
||||||
# DEBUG
|
|
||||||
set -x
|
|
||||||
|
|
||||||
match_header() {
|
match_header() {
|
||||||
local bytes=$(echo -en "$1")
|
local bytes=$(echo -en "$1")
|
||||||
[ "$bytes" = "$(dd bs=1 count=${#bytes} if="$2" 2>/dev/null)" ]
|
[ "$bytes" = "$(dd bs=1 count=${#bytes} if="$2" 2>/dev/null)" ]
|
||||||
|
|||||||
@ -1,9 +1,6 @@
|
|||||||
# NoCloud Instance Metadata
|
# NoCloud Instance Metadata
|
||||||
# vim: ts=4 et ft=sh:
|
# vim: ts=4 et ft=sh:
|
||||||
|
|
||||||
# DEBUG
|
|
||||||
set -x
|
|
||||||
|
|
||||||
NOCLOUD_FILES="meta-data user-data vendor-data network-config"
|
NOCLOUD_FILES="meta-data user-data vendor-data network-config"
|
||||||
|
|
||||||
is_nocloud_loaded() { [ -f "$TINY_CLOUD_VAR/.nocloud_loaded" ]; }
|
is_nocloud_loaded() { [ -f "$TINY_CLOUD_VAR/.nocloud_loaded" ]; }
|
||||||
@ -92,7 +89,7 @@ _imds() {
|
|||||||
[ -f "$file" ] || return 1
|
[ -f "$file" ] || return 1
|
||||||
|
|
||||||
# use 'file/' to get top-level keys
|
# use 'file/' to get top-level keys
|
||||||
if [ $(basename "$file") = "keypath" ]; then
|
if [ $(basename "$file") = "$keypath" ]; then
|
||||||
cat "$file"
|
cat "$file"
|
||||||
else
|
else
|
||||||
yx -f "$file" $keypath
|
yx -f "$file" $keypath
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user