diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-04-17 21:24:23 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-04-17 21:24:23 +0200 |
commit | 6d577534c37b83efda0b53e2b2fa065db8cc001c (patch) | |
tree | 98b5b1ca0970711ccc34ed6d11f5e926ac52b7e7 | |
parent | 9f120dbdde7ff0330a7d8417d2577888019abab0 (diff) | |
download | desktop-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.
-rwxr-xr-x | bin/desktop-autoloader | 13 | ||||
-rw-r--r-- | contrib/desktop-autoloader.default | 3 |
2 files changed, 16 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 diff --git a/contrib/desktop-autoloader.default b/contrib/desktop-autoloader.default index b31b421..c41a590 100644 --- a/contrib/desktop-autoloader.default +++ b/contrib/desktop-autoloader.default @@ -3,6 +3,9 @@ # This file allows you to tweak the behaviour of the Desktop Autoloader # tool. +# The autoloader is disabled by default. Enable it here (s/false/true/). +#DESKTOP_AUTOLOADER_ENABLED=false + # The virtual display to be used for the autoloader session. AUTOLOAD_DISPLAY=:20 |