From 6d577534c37b83efda0b53e2b2fa065db8cc001c Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 17 Apr 2018 21:24:23 +0200 Subject: Assure that Desktop Autoloader is disabled by default and requires an explicit activation step. --- bin/desktop-autoloader | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'bin') 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 -- cgit v1.2.3