aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-04-17 21:24:23 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-04-17 21:24:23 +0200
commit6d577534c37b83efda0b53e2b2fa065db8cc001c (patch)
tree98b5b1ca0970711ccc34ed6d11f5e926ac52b7e7 /bin
parent9f120dbdde7ff0330a7d8417d2577888019abab0 (diff)
downloaddesktop-autoloader-6d577534c37b83efda0b53e2b2fa065db8cc001c.tar.gz
desktop-autoloader-6d577534c37b83efda0b53e2b2fa065db8cc001c.tar.bz2
desktop-autoloader-6d577534c37b83efda0b53e2b2fa065db8cc001c.zip
Assure that Desktop Autoloader is disabled by default and requires an explicit activation step.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/desktop-autoloader13
1 files changed, 13 insertions, 0 deletions
diff --git a/bin/desktop-autoloader b/bin/desktop-autoloader
index 440ccea..9a13de1 100755
--- a/bin/desktop-autoloader
+++ b/bin/desktop-autoloader
@@ -20,11 +20,24 @@
# Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA
+DESKTOP_AUTOLOADER_ENABLE=false
AUTOLOAD_DISPLAY=":20"
DESKTOP_SESSION_MANAGER="x-session-manager"
test -f /etc/default/desktop-autoloader && . /etc/default/desktop-autoloader
+function is_true() {
+
+ echo $1 | egrep "(y|Y|yes|YES|Yes|true|TRUE|True|On|ON|on)" 1>/dev/null
+ return $?
+
+}
+
+if ! is_true "$DESKTOP_AUTOLOADER_ENABLE"; then
+ echo "Desktop Autoloader is not enabled, enable it in /etc/default/desktop-autoloader"
+ exit 0
+fi
+
# clean up .xsession-errors for a new launch (in case this tool is used
# on a non-diskless machine...
if [ "$(id -un)" == "desktop-autoloader" ]; then