aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
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