summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorSimon Spöhel <simon@spoehel.ch>2023-08-23 13:39:17 +0000
committerSimon Spöhel <simon@spoehel.ch>2023-08-24 14:42:33 +0000
commit1acf6afd66c2d7e9a8a5bff42fd1484187d58426 (patch)
treee1d024adff12e371b5695b50a27955dfdffda23c /share
parentbasic cnt rm support. (diff)
downloadcompute-tools-1acf6afd66c2d7e9a8a5bff42fd1484187d58426.tar.xz
compute-tools-1acf6afd66c2d7e9a8a5bff42fd1484187d58426.zip
Basic unifid start.
Diffstat (limited to 'share')
-rwxr-xr-xshare/build-scripts/debconf6
-rw-r--r--share/systemd/qemu@.service13
2 files changed, 19 insertions, 0 deletions
diff --git a/share/build-scripts/debconf b/share/build-scripts/debconf
index 8307695..a20212f 100755
--- a/share/build-scripts/debconf
+++ b/share/build-scripts/debconf
@@ -1163,6 +1163,7 @@ EOF
echo 'fs0:\EFI\progress-linux\grubx64.efi' > "${DIRECTORY}/boot/efi/EFI/boot/startup.nsh"
sed -i \
+ -e "s|@DIRECTORY@|${SYSTEM_BASE_DIR}/${NAME}|g" \
-e "s|@BOOT_METHOD@|${BOOT_METHOD}|g" \
-e "s|@CPU@|${CPU}|g" \
-e "s|@MEMORY@|${MEMORY}|g" \
@@ -1359,9 +1360,14 @@ fi
case "${BOOT_METHOD}" in
qemu)
+ SYSTEM_BASE_DIR="${VMS}"
Create_vm_disk
Mount_vm_disk
;;
+
+ systemd-nspawn)
+ SYSTEM_BASE_DIR="${MACHINES}"
+ ;;
esac
case "${INSTALLER}" in
diff --git a/share/systemd/qemu@.service b/share/systemd/qemu@.service
new file mode 100644
index 0000000..8c36df4
--- /dev/null
+++ b/share/systemd/qemu@.service
@@ -0,0 +1,13 @@
+[Unit]
+Description="Container: %i"
+Documentation=man:compute-tools
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/container start -n %i --nspawn
+ExecStartPost=/usr/bin/container start -n %i --start
+#ExecStopPost=/usr/bin/container stop -n %i --clean --no-notification
+KillMode=mixed
+
+[Install]
+WantedBy=multi-user.target