summaryrefslogtreecommitdiffstats
path: root/share/build-scripts/debconf.d/0003-debconf
diff options
context:
space:
mode:
authorSimon Spöhel <simon@spoehel.ch>2023-08-24 14:35:18 +0000
committerSimon Spöhel <simon@spoehel.ch>2023-08-24 14:41:06 +0000
commit7c674a11ca49df28f78f49a876660891ad7b4355 (patch)
tree6e0663b70509c15ec97f15ba24137117d30a9acb /share/build-scripts/debconf.d/0003-debconf
parentAdding todo file (FIXME). (diff)
downloadcompute-tools-7c674a11ca49df28f78f49a876660891ad7b4355.tar.xz
compute-tools-7c674a11ca49df28f78f49a876660891ad7b4355.zip
basic cnt build for vms (debconf only)
Diffstat (limited to 'share/build-scripts/debconf.d/0003-debconf')
-rwxr-xr-xshare/build-scripts/debconf.d/0003-debconf209
1 files changed, 209 insertions, 0 deletions
diff --git a/share/build-scripts/debconf.d/0003-debconf b/share/build-scripts/debconf.d/0003-debconf
index e12e25e..76da4c2 100755
--- a/share/build-scripts/debconf.d/0003-debconf
+++ b/share/build-scripts/debconf.d/0003-debconf
@@ -1340,6 +1340,195 @@ Internal_options ()
echo "CNT_OVERLAY_OPTIONS=\"${CNT_OVERLAY_OPTIONS}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
}
+Cpu ()
+{
+ db_get container/cpu
+ CPU="${RET}" # select
+
+ if [ -z "${CPU}" ]
+ then
+ CPU="${RET}" # string (w/o empty)
+
+ case "${CPU}" in
+ debconf)
+ CPU="host"
+ ;;
+ esac
+ fi
+
+ echo "CPU=\"${CPU}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
+ export CPU
+}
+
+Memory ()
+{
+ db_get container/memory
+ MEMORY="${RET}" # select
+
+ if [ -z "${MEMORY}" ]
+ then
+ MEMORY="${RET}" # string (w/o empty)
+
+ case "${MEMORY}" in
+ debconf)
+ MEMORY="2G"
+ ;;
+ esac
+ fi
+
+ echo "MEMORY=\"${MEMORY}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
+ export MEMORY
+}
+
+Display ()
+{
+ db_get container/display
+ DISPLAY="${RET}" # select
+
+ if [ -z "${DISPLAY}" ]
+ then
+ DISPLAY="${RET}" # string (w/o empty)
+
+ case "${DISPLAY}" in
+ debconf)
+ DISPLAY="2G"
+ ;;
+ esac
+ fi
+
+ echo "DISPLAY=\"${DISPLAY}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
+ export DISPLAY
+}
+
+Serial ()
+{
+ db_get container/serial
+ SERIAL="${RET}" # select
+
+ if [ -z "${SERIAL}" ]
+ then
+ SERIAL="${RET}" # string (w/o empty)
+
+ case "${SERIAL}" in
+ debconf)
+ SERIAL="host"
+ ;;
+ esac
+ fi
+
+ echo "SERIAL=\"${SERIAL}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
+ export SERIAL
+}
+
+Monitor ()
+{
+ db_get container/monitor
+ MONITOR="${RET}" # select
+
+ if [ -z "${MONITOR}" ]
+ then
+ MONITOR="${RET}" # string (w/o empty)
+
+ case "${MONITOR}" in
+ debconf)
+ MONITOR="host"
+ ;;
+ esac
+ fi
+
+ echo "MONITOR=\"${MONITOR}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
+ export MONITOR
+}
+
+Firmware ()
+{
+ db_get container/firmware
+ FIRMWARE="${RET}" # select
+
+ if [ -z "${FIRMWARE}" ]
+ then
+ FIRMWARE="${RET}" # string (w/o empty)
+
+ case "${FIRMWARE}" in
+ debconf)
+ FIRMWARE="host"
+ ;;
+ esac
+ fi
+
+ echo "FIRMWARE=\"${FIRMWARE}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
+ export FIRMWARE
+}
+
+Drive ()
+{
+ db_get container/drive
+ DRIVE="${RET}" # select
+
+ if [ -z "${DRIVE}" ]
+ then
+ DRIVE="${RET}" # string (w/o empty)
+
+ case "${DRIVE}" in
+ debconf)
+ DRIVE="host"
+ ;;
+ esac
+ fi
+
+ echo "DRIVE=\"${DRIVE}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
+ export DRIVE
+}
+
+Netdev ()
+{
+ db_get container/netdev
+ NETDEV="${RET}" # string (w/ empty)
+
+ echo "NETDEV=\"${NETDEV}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
+ export NETDEV
+}
+
+Qemu_raw ()
+{
+ db_get container/qemu-raw
+ QEMU_RAW="${RET}" # select
+
+ if [ -z "${QEMU_RAW}" ]
+ then
+ QEMU_RAW="${RET}" # string (w/o empty)
+
+ case "${QEMU_RAW}" in
+ debconf)
+ QEMU_RAW="host"
+ ;;
+ esac
+ fi
+
+ echo "QEMU_RAW=\"${QEMU_RAW}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
+ export QEMU_RAW
+}
+
+Boot_method ()
+{
+ db_get container/boot-method
+ BOOT_METHOD="${RET}" # select
+
+ if [ -z "${BOOT_METHOD}" ]
+ then
+ BOOT_METHOD="${RET}" # string (w/o empty)
+
+ case "${BOOT_METHOD}" in
+ debconf)
+ BOOT_METHOD="systemd-nspawn"
+ ;;
+ esac
+ fi
+
+ echo "BOOT_METHOD=\"${BOOT_METHOD}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
+ export BOOT_METHOD
+}
+
Mode
Images
@@ -1368,4 +1557,24 @@ Root_password
Internal_options
+Cpu
+
+Memory
+
+Display
+
+Serial
+
+Monitor
+
+Firmware
+
+Drive
+
+Netdev
+
+Qemu_raw
+
+Boot_method
+
db_stop