summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcore/modules/idleaction/data/opt/openslx/scripts/idleaction-scheduled_action6
-rwxr-xr-xcore/modules/kexec-reboot/data/opt/openslx/bin/kexec-reboot4
2 files changed, 7 insertions, 3 deletions
diff --git a/core/modules/idleaction/data/opt/openslx/scripts/idleaction-scheduled_action b/core/modules/idleaction/data/opt/openslx/scripts/idleaction-scheduled_action
index 57ffcc04..7a1b2afd 100755
--- a/core/modules/idleaction/data/opt/openslx/scripts/idleaction-scheduled_action
+++ b/core/modules/idleaction/data/opt/openslx/scripts/idleaction-scheduled_action
@@ -12,7 +12,7 @@ if [ "$1" = "--detach" ]; then
fi
if [ $# -lt 1 ]; then
- echo "$0 [--detach] <reboot|poweroff> [delay_minutes]" >&2
+ echo "$0 [--detach] <reboot|poweroff|kexec-reboot> [delay_minutes]" >&2
exit 2
fi
@@ -49,7 +49,7 @@ if [ -n "$TS" ]; then
fi
fi
-if [ "$MODE" != "reboot" ] && [ "$MODE" != "poweroff" ]; then
+if [ "$MODE" != "reboot" ] && [ "$MODE" != "poweroff" ] && [ "$MODE" != "kexec-reboot" ]; then
slxlog --echo "idleaction-failed-call" "Invalid call to idleaction-scheduled_action. Mode '$MODE' unknown." >&2
exit 3
fi
@@ -79,7 +79,7 @@ runaction () {
[ "$NUM" = "0" ] && break
if [ "$MINUTES" != "X" ]; then
USERS=0
- if [ "$MODE" = "reboot" ]; then
+ if [ "${MODE#*-}" = "reboot" ]; then
MESSAGE="Das System wird in $MINUTES Minute(n) neugestartet, bitte beenden Sie Ihre Sitzung.
The system will reboot in $MINUTES minute(s). Please save your work and end the session."
else
diff --git a/core/modules/kexec-reboot/data/opt/openslx/bin/kexec-reboot b/core/modules/kexec-reboot/data/opt/openslx/bin/kexec-reboot
new file mode 100755
index 00000000..60197f50
--- /dev/null
+++ b/core/modules/kexec-reboot/data/opt/openslx/bin/kexec-reboot
@@ -0,0 +1,4 @@
+#!/bin/ash
+
+exec systemctl start kexec.target
+