summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/modules/apply-slx-vars/data/etc/systemd/system/apply-slx-vars.service10
l---------core/modules/apply-slx-vars/data/etc/systemd/system/basic.target.wants/apply-slx-vars.service1
-rwxr-xr-xcore/modules/apply-slx-vars/data/opt/openslx/scripts/apply-slx-vars15
-rw-r--r--core/modules/apply-slx-vars/module.build13
-rw-r--r--core/modules/apply-slx-vars/module.conf4
l---------core/targets/bwlp/apply-slx-vars1
l---------core/targets/stage32-bwlp/apply-slx-vars1
7 files changed, 45 insertions, 0 deletions
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 <<EOF
+Section "ServerFlags"
+ Option "DontVTSwitch" "true"
+EndSection
+EOF
+fi
+
+exit 0
diff --git a/core/modules/apply-slx-vars/module.build b/core/modules/apply-slx-vars/module.build
new file mode 100644
index 00000000..5086d1bc
--- /dev/null
+++ b/core/modules/apply-slx-vars/module.build
@@ -0,0 +1,13 @@
+#!/bin/bash
+# fake module simply copying its data/ files
+fetch_source() {
+ :
+}
+
+build() {
+ :
+}
+
+post_copy() {
+ :
+}
diff --git a/core/modules/apply-slx-vars/module.conf b/core/modules/apply-slx-vars/module.conf
new file mode 100644
index 00000000..8811668a
--- /dev/null
+++ b/core/modules/apply-slx-vars/module.conf
@@ -0,0 +1,4 @@
+#!/bin/bash
+REQUIRED_BINARIES=""
+REQUIRED_LIBRARIES=""
+REQUIRED_DIRECTORIES=""
diff --git a/core/targets/bwlp/apply-slx-vars b/core/targets/bwlp/apply-slx-vars
new file mode 120000
index 00000000..5406eb3d
--- /dev/null
+++ b/core/targets/bwlp/apply-slx-vars
@@ -0,0 +1 @@
+../../modules/apply-slx-vars \ No newline at end of file
diff --git a/core/targets/stage32-bwlp/apply-slx-vars b/core/targets/stage32-bwlp/apply-slx-vars
new file mode 120000
index 00000000..5406eb3d
--- /dev/null
+++ b/core/targets/stage32-bwlp/apply-slx-vars
@@ -0,0 +1 @@
+../../modules/apply-slx-vars \ No newline at end of file