summaryrefslogtreecommitdiffstats
path: root/core/modules/xorg/data/etc/X11/Xreset
blob: 23048ab9668d4aba6be351b028682b8c1850721d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/ash
#
# /etc/X11/Xreset
#
# Xreset - run as root after session exits
#

# Only run this if a session was actually started, as lightdm also calls
# this script on every failed login attempt
[ -e "/run/openslx/ldm-session-$DISPLAY" ] || exit 0
rm -f -- "/run/openslx/ldm-session-$DISPLAY"

export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/openslx/sbin:/opt/openslx/bin"

PROGNAME=Xreset
SYSSESSIONDIR=/etc/X11/Xreset.d

if [ ! -d "$SYSSESSIONDIR" ]; then
  # Nothing to do, exiting
  exit 0
fi

for SESSIONFILE in $SYSSESSIONDIR/*; do
	. "$SESSIONFILE" || slxlog "xreset" "Xreset: Could not source $SESSIONFILE." "$SESSIONFILE" 
done

exit 0