From 9271853d114fea88e86522b217531cef30f86b75 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 22 Feb 2021 11:17:02 +0100 Subject: [apply-slx-vars] New module Generic module that should evaluate different SLX_* variables from /opt/openslx/config and act upon them. --- .../data/etc/systemd/system/apply-slx-vars.service | 10 ++++++++++ .../system/basic.target.wants/apply-slx-vars.service | 1 + .../data/opt/openslx/scripts/apply-slx-vars | 15 +++++++++++++++ core/modules/apply-slx-vars/module.build | 13 +++++++++++++ core/modules/apply-slx-vars/module.conf | 4 ++++ 5 files changed, 43 insertions(+) create mode 100644 core/modules/apply-slx-vars/data/etc/systemd/system/apply-slx-vars.service create mode 120000 core/modules/apply-slx-vars/data/etc/systemd/system/basic.target.wants/apply-slx-vars.service create mode 100755 core/modules/apply-slx-vars/data/opt/openslx/scripts/apply-slx-vars create mode 100644 core/modules/apply-slx-vars/module.build create mode 100644 core/modules/apply-slx-vars/module.conf (limited to 'core/modules/apply-slx-vars') diff --git a/core/modules/apply-slx-vars/data/etc/systemd/system/apply-slx-vars.service b/core/modules/apply-slx-vars/data/etc/systemd/system/apply-slx-vars.service new file mode 100644 index 00000000..0f940b68 --- /dev/null +++ b/core/modules/apply-slx-vars/data/etc/systemd/system/apply-slx-vars.service @@ -0,0 +1,10 @@ +[Unit] +Description=Apply SLX_* config var settings +DefaultDependencies=no +Before=basic.target + +[Service] +Type=oneshot +RemainAfterExit=true +RefuseManualStart=true +ExecStart=/opt/openslx/scripts/apply-slx-vars diff --git a/core/modules/apply-slx-vars/data/etc/systemd/system/basic.target.wants/apply-slx-vars.service b/core/modules/apply-slx-vars/data/etc/systemd/system/basic.target.wants/apply-slx-vars.service new file mode 120000 index 00000000..531a34fb --- /dev/null +++ b/core/modules/apply-slx-vars/data/etc/systemd/system/basic.target.wants/apply-slx-vars.service @@ -0,0 +1 @@ +../apply-slx-vars.service \ No newline at end of file diff --git a/core/modules/apply-slx-vars/data/opt/openslx/scripts/apply-slx-vars b/core/modules/apply-slx-vars/data/opt/openslx/scripts/apply-slx-vars new file mode 100755 index 00000000..22996a38 --- /dev/null +++ b/core/modules/apply-slx-vars/data/opt/openslx/scripts/apply-slx-vars @@ -0,0 +1,15 @@ +#!/bin/ash + +. /opt/openslx/config + +# Disable TTY switch +if [ "$SLX_TTY_SWITCH" = "no" ]; then + mkdir -p /etc/X11/xorg.conf.d + cat > /etc/X11/xorg.conf.d/50-no-tty.conf <