diff --git a/recipes-sysmobts/sysmobts-config/files/sysmobts-post-install-config b/recipes-sysmobts/sysmobts-config/files/sysmobts-post-install-config new file mode 100644 index 0000000000..d32f85f689 --- /dev/null +++ b/recipes-sysmobts/sysmobts-config/files/sysmobts-post-install-config @@ -0,0 +1,23 @@ +#!/bin/bash + + +prepare_sysmobts_2050() { + # Disable getty and mangle the config + /bin/systemctl mask serial-getty@ttyS0.service + + # We need to mange the systemd config file + sed -i s,#LogTarget=journal-or-kmsg,LogTarget=null, /etc/systemd/system.conf + sed -i s,#ShowStatus=yes,ShowStatus=no, /etc/systemd/system.conf + sed -i s,#DefaultStandardOutput=journal,DefaultStandardOutput=syslog, /etc/systemd/system.conf + sed -i s,#DefaultStandardError=inherit,DefaultStandardError=syslog, /etc/systemd/system.conf +} + + +# +MODEL=`/usr/bin/sysmobts-util -r model-nr` + +if [ $MODEL -eq "2050" ]; +then + echo "Going to fix the configuration for sysmobts-2050" + prepare_sysmobts_2050 +fi diff --git a/recipes-sysmobts/sysmobts-config/sysmobts-config_1.bb b/recipes-sysmobts/sysmobts-config/sysmobts-config_1.bb new file mode 100644 index 0000000000..8114224df5 --- /dev/null +++ b/recipes-sysmobts/sysmobts-config/sysmobts-config_1.bb @@ -0,0 +1,21 @@ +DESCRIPTION = "Script to mangle the configuration" +SECTION = "core" +LICENSE = "CLOSED" + +SRC_URI = "file://sysmobts-post-install-config" + +do_install() { + install -d ${D}${bindir} + install -m 0755 ${WORKDIR}/sysmobts-post-install-config ${D}${bindir}/ +} + +pkg_postinst_${PN} () { +if test "x$D" != "x"; then + exit 1 +else + echo "Going to run device specific post configuration" + /usr/bin/sysmobts-post-install-config +fi +} + +PACKAGE_ARCH = "all"