Message ID | 20250318140622.13676-4-ubely@ilbers.de |
---|---|
State | New |
Headers | show |
Series | Fixes for unattended installation | expand |
On 18.03.25 15:02, Uladzimir Bely wrote: > Different machines may use different terminals we want to > run installer on. Allow this to be set in local.conf via > INSTALLER_GETTY_TARGETS variables. > > Signed-off-by: Uladzimir Bely <ubely@ilbers.de> > --- > .../deploy-image-service/deploy-image-service.bb | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/meta-isar/recipes-installer/deploy-image-service/deploy-image-service.bb b/meta-isar/recipes-installer/deploy-image-service/deploy-image-service.bb > index 0fa3dcf3..fbcfbbfa 100644 > --- a/meta-isar/recipes-installer/deploy-image-service/deploy-image-service.bb > +++ b/meta-isar/recipes-installer/deploy-image-service/deploy-image-service.bb > @@ -13,9 +13,14 @@ SRC_URI = "file://install.override.conf \ > DEPENDS += " deploy-image" > DEBIAN_DEPENDS = "deploy-image" > > +INSTALLER_GETTY_TARGETS ?= "getty@tty1 serial-getty@ttyS0" > + > do_install[cleandirs] = "${D}/usr/lib/systemd/system/getty@tty1.service.d/ \ > ${D}/usr/lib/systemd/system/serial-getty@ttyS0.service.d/" Now only "${D}/usr/lib/systemd/system/" > do_install() { > - install -m 0600 ${WORKDIR}/install.override.conf ${D}/usr/lib/systemd/system/getty@tty1.service.d/override.conf > - install -m 0600 ${WORKDIR}/install.override.conf ${D}/usr/lib/systemd/system/serial-getty@ttyS0.service.d/override.conf > + for target in ${INSTALLER_GETTY_TARGETS}; do > + rm -rf ${D}/usr/lib/systemd/system/${target}.service.d/* Unneeded, we already have cleandirs. > + install -d -m 0700 ${D}/usr/lib/systemd/system/${target}.service.d/ > + install -m 0600 ${WORKDIR}/install.override.conf ${D}/usr/lib/systemd/system/${target}.service.d/ > + done > } Jan
diff --git a/meta-isar/recipes-installer/deploy-image-service/deploy-image-service.bb b/meta-isar/recipes-installer/deploy-image-service/deploy-image-service.bb index 0fa3dcf3..fbcfbbfa 100644 --- a/meta-isar/recipes-installer/deploy-image-service/deploy-image-service.bb +++ b/meta-isar/recipes-installer/deploy-image-service/deploy-image-service.bb @@ -13,9 +13,14 @@ SRC_URI = "file://install.override.conf \ DEPENDS += " deploy-image" DEBIAN_DEPENDS = "deploy-image" +INSTALLER_GETTY_TARGETS ?= "getty@tty1 serial-getty@ttyS0" + do_install[cleandirs] = "${D}/usr/lib/systemd/system/getty@tty1.service.d/ \ ${D}/usr/lib/systemd/system/serial-getty@ttyS0.service.d/" do_install() { - install -m 0600 ${WORKDIR}/install.override.conf ${D}/usr/lib/systemd/system/getty@tty1.service.d/override.conf - install -m 0600 ${WORKDIR}/install.override.conf ${D}/usr/lib/systemd/system/serial-getty@ttyS0.service.d/override.conf + for target in ${INSTALLER_GETTY_TARGETS}; do + rm -rf ${D}/usr/lib/systemd/system/${target}.service.d/* + install -d -m 0700 ${D}/usr/lib/systemd/system/${target}.service.d/ + install -m 0600 ${WORKDIR}/install.override.conf ${D}/usr/lib/systemd/system/${target}.service.d/ + done }
Different machines may use different terminals we want to run installer on. Allow this to be set in local.conf via INSTALLER_GETTY_TARGETS variables. Signed-off-by: Uladzimir Bely <ubely@ilbers.de> --- .../deploy-image-service/deploy-image-service.bb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)