debug-generator: Add unit and drop-in credentials

These allow adding extra units and drop-ins via credentials.
This commit is contained in:
Daan De Meyer
2024-04-04 16:17:38 +02:00
parent 4c10a89ec1
commit 8595f578fe
5 changed files with 141 additions and 5 deletions
+4
View File
@@ -200,6 +200,10 @@ elif [ -d /sys/firmware/qemu_fw_cfg/by_name ]; then
[ "$(cat /tmp/sourcedfromcredential)" = "tmpfilessecret" ]
[ "$(cat /etc/motd.d/50-provision.conf)" = "hello" ]
[ "$(cat /etc/issue.d/50-provision.conf)" = "welcome" ]
# Verify that adding a unit and drop-in via credentials worked
systemctl start my-service
test -f /tmp/unit-dropin
else
echo "qemu_fw_cfg support missing in kernel. Sniff!"
expected_credential=""