summaryrefslogtreecommitdiffstats
path: root/core/modules/safe-mode
diff options
context:
space:
mode:
authorSimon Rettberg2017-11-14 14:31:37 +0100
committerSimon Rettberg2017-11-14 14:31:37 +0100
commitaf6b538c0544cad026f7d03998b630910c1822d7 (patch)
treed622764938da835d815ffe29da242e27ee1a7898 /core/modules/safe-mode
parentUpdate stage32 targets (diff)
downloadmltk-af6b538c0544cad026f7d03998b630910c1822d7.tar.gz
mltk-af6b538c0544cad026f7d03998b630910c1822d7.tar.xz
mltk-af6b538c0544cad026f7d03998b630910c1822d7.zip
[safe-mode] Support lightdm
Diffstat (limited to 'core/modules/safe-mode')
-rw-r--r--core/modules/safe-mode/data/etc/systemd/system/exam-mode.target4
l---------core/modules/safe-mode/data/etc/systemd/system/exam-mode.target.wants/exam.service1
l---------core/modules/safe-mode/data/etc/systemd/system/exam-mode.target.wants/graphical.target1
-rw-r--r--core/modules/safe-mode/data/etc/systemd/system/exam.service1
-rwxr-xr-xcore/modules/safe-mode/data/opt/openslx/scripts/systemd-safe_mode11
5 files changed, 18 insertions, 0 deletions
diff --git a/core/modules/safe-mode/data/etc/systemd/system/exam-mode.target b/core/modules/safe-mode/data/etc/systemd/system/exam-mode.target
new file mode 100644
index 00000000..66438593
--- /dev/null
+++ b/core/modules/safe-mode/data/etc/systemd/system/exam-mode.target
@@ -0,0 +1,4 @@
+[Unit]
+Description=bwLehrpool Klausurmodus
+Requires=multi-user.target
+After=multi-user.target
diff --git a/core/modules/safe-mode/data/etc/systemd/system/exam-mode.target.wants/exam.service b/core/modules/safe-mode/data/etc/systemd/system/exam-mode.target.wants/exam.service
new file mode 120000
index 00000000..4ee9b5fa
--- /dev/null
+++ b/core/modules/safe-mode/data/etc/systemd/system/exam-mode.target.wants/exam.service
@@ -0,0 +1 @@
+../exam.service \ No newline at end of file
diff --git a/core/modules/safe-mode/data/etc/systemd/system/exam-mode.target.wants/graphical.target b/core/modules/safe-mode/data/etc/systemd/system/exam-mode.target.wants/graphical.target
new file mode 120000
index 00000000..949b0756
--- /dev/null
+++ b/core/modules/safe-mode/data/etc/systemd/system/exam-mode.target.wants/graphical.target
@@ -0,0 +1 @@
+../graphical.target \ No newline at end of file
diff --git a/core/modules/safe-mode/data/etc/systemd/system/exam.service b/core/modules/safe-mode/data/etc/systemd/system/exam.service
index be0809b4..14473a6f 100644
--- a/core/modules/safe-mode/data/etc/systemd/system/exam.service
+++ b/core/modules/safe-mode/data/etc/systemd/system/exam.service
@@ -1,6 +1,7 @@
[Unit]
Description=Sets up safe mode (no magic keys, no tty switch, no openbox menu)
DefaultDependencies=no
+Before=graphical.target display-manager.target
[Service]
Type=oneshot
diff --git a/core/modules/safe-mode/data/opt/openslx/scripts/systemd-safe_mode b/core/modules/safe-mode/data/opt/openslx/scripts/systemd-safe_mode
index ebcee099..82ec5878 100755
--- a/core/modules/safe-mode/data/opt/openslx/scripts/systemd-safe_mode
+++ b/core/modules/safe-mode/data/opt/openslx/scripts/systemd-safe_mode
@@ -19,6 +19,17 @@ disable_magic_keys() {
echo 0 > /proc/sys/kernel/sysrq
}
+change_loginscreen() {
+ local CF="/etc/lightdm/qt-lightdm-greeter.conf"
+ sed -r -i 's/#[a-fA-F0-9]{6}/#757575/g' "/opt/openslx/lightdm/bwlp-banner.svg"
+ sed -r -i '/^greeter-background/d' "$CF"
+ echo "greeter-background-gradient=f9a72b ffffff" >> "$CF"
+}
+
disable_tty_switch
disable_openbox_menu
disable_magic_keys
+change_loginscreen
+
+exit 0
+