aboutsummaryrefslogtreecommitdiffstats
path: root/bin/fndSession
diff options
context:
space:
mode:
Diffstat (limited to 'bin/fndSession')
-rwxr-xr-xbin/fndSession6
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/fndSession b/bin/fndSession
index baf45da..5697a2d 100755
--- a/bin/fndSession
+++ b/bin/fndSession
@@ -4,6 +4,8 @@
LIST="SessionTypes"
+TMP=$(/bin/mktemp /tmp/.kdm.XXXXXXX)
+
[ -x /usr/bin/kde ] && {
LIST="$LIST=kde"; FIRST=yes
}
@@ -62,5 +64,5 @@ if [ $FIRST = "yes" ];then
else
LIST="$LIST=default;failsafe;"
fi
-sed "s/^SessionTypes.*/"$LIST"/" /usr/share/config/kdmrc > /tmp/$$.kdmrc && \
-mv /tmp/$$.kdmrc /usr/share/config/kdmrc
+sed "s/^SessionTypes.*/"$LIST"/" /usr/share/config/kdmrc > $TMP && \
+mv $TMP /usr/share/config/kdmrc