This recipe will launch bare X using systemd

Signed-off-by: Khem Raj <raj.k...@gmail.com>
---
 recipes-angstrom/angstrom/angstrom-xinit.bb        | 18 ++++++++++++++++++
 recipes-angstrom/angstrom/angstrom-xinit/X.service | 19 +++++++++++++++++++
 2 files changed, 37 insertions(+)
 create mode 100644 recipes-angstrom/angstrom/angstrom-xinit.bb
 create mode 100644 recipes-angstrom/angstrom/angstrom-xinit/X.service

diff --git a/recipes-angstrom/angstrom/angstrom-xinit.bb 
b/recipes-angstrom/angstrom/angstrom-xinit.bb
new file mode 100644
index 0000000..71ec944
--- /dev/null
+++ b/recipes-angstrom/angstrom/angstrom-xinit.bb
@@ -0,0 +1,18 @@
+DESCRIPTION = "Systemd service to start a bare X session"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = 
"file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
+
+SRC_URI = "file://X.service \
+          "
+inherit systemd
+
+do_install() {
+       install -d ${D}${systemd_unitdir}/system/
+       install -m 0644 ${WORKDIR}/*.service ${D}${systemd_unitdir}/system
+}
+
+SYSTEMD_SERVICE_${PN} = "X.service"
+
+RDEPENDS_${PN} = "packagegroup-core-x11-xserver"
+PACKAGE_ARCH = "all"
+
diff --git a/recipes-angstrom/angstrom/angstrom-xinit/X.service 
b/recipes-angstrom/angstrom/angstrom-xinit/X.service
new file mode 100644
index 0000000..54cb5f6
--- /dev/null
+++ b/recipes-angstrom/angstrom/angstrom-xinit/X.service
@@ -0,0 +1,19 @@
+[Unit]
+Description=Xserver startup
+
+[Service]
+ExecStart=/usr/bin/X -wr
+Restart=always
+KillMode=none
+SendSIGKILL=no
+
+# the following allows 5 restarts in a 300s (5 minute) interval.  If we hit 
the limit
+# then we reboot the system
+StartLimitInterval=300s
+StartLimitBurst=5
+StartLimitAction=reboot
+
+
+[Install]
+WantedBy=graphical.target
+
-- 
1.8.5.2


_______________________________________________
Angstrom-distro-devel mailing list
Angstrom-distro-devel@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/angstrom-distro-devel

Reply via email to