1
0
mirror of https://gitlab.alpinelinux.org/alpine/cloud/tiny-cloud.git synced 2025-12-14 19:02:45 +03:00

Add incus autodetect

This commit is contained in:
Natanael Copa 2024-06-28 12:32:59 +02:00
parent 966f0bb2a4
commit 9d1d448a16
2 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,3 @@
#!/bin/sh
test -e "$ROOT"/dev/incus/sock && echo "10 incus"

View File

@ -25,6 +25,7 @@ init_tests \
userdata_type \
run_userdata \
autodetect_unknown \
autodetect_incus \
autodetect_nocloud_cmdline \
autodetect_nocloud_dmi \
autodetect_nocloud_volume
@ -236,6 +237,14 @@ autodetect_unknown_body() {
sh -c ". \"$lib\"; echo \$CLOUD"
}
autodetect_incus_body() {
mkdir -p dev/incus
touch dev/incus/sock
atf_check \
-o match:"incus" \
sh -c ". \"$lib\"; echo \$CLOUD"
}
autodetect_nocloud_cmdline_body() {
mkdir -p proc
echo "quiet ds=nocloud;s=https://10.42.42.42/ console=ttyS0" > proc/cmdline