changeset 1251:3b433a350092

(issue54) Disable start after installation when root.
author Andre Heinecke <andre.heinecke@intevation.de>
date Thu, 25 Sep 2014 15:56:37 +0200
parents 7ea3a4c0e2ae
children 9a482182f80f
files packaging/linux-installer.inc
diffstat 1 files changed, 7 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/packaging/linux-installer.inc	Thu Sep 25 15:53:49 2014 +0200
+++ b/packaging/linux-installer.inc	Thu Sep 25 15:56:37 2014 +0200
@@ -123,11 +123,9 @@
   echo "################################################################################"
   if [ $SYSINST -eq 1 ]; then
     getxt "System wide installation successful.\n"
-    RUNCMD="su -l $SUDO_USER -c "
     UN_RUNCMD="sudo "
   else
     getxt "Single user installation successful.\n"
-    RUNCMD=""
     UN_RUNCMD=""
   fi
   getxt "TrustBridge has been installed to: '%s'\n\n" "${instcfg[PREFIX]}"
@@ -137,15 +135,13 @@
   echo "  $UN_RUNCMD ${instcfg[PREFIX]}/bin/trustbridge-uninstall.sh"
 
   echo "################################################################################"
-  if ! [ $(id -u) -eq 0 -a -z "$SUDO_USER" ]; then
-    if [ $UPDATE -eq 0 ]; then
-      getxt "Press enter to launch '%s'\n" "${instcfg[PREFIX]}/bin/trustbridge"
-      getxt "or press Control-C to quit the installer.\n"
-      read
-      $RUNCMD "${instcfg[PREFIX]}/bin/trustbridge" &
-    else
-      $RUNCMD "${instcfg[PREFIX]}/bin/trustbridge" --tray &
-    fi
+  if ! [ $(id -u) -eq 0 ]; then
+    getxt "Press enter to launch '%s'\n" "${instcfg[PREFIX]}/bin/trustbridge"
+    getxt "or press Control-C to quit the installer.\n"
+    read
+    "${instcfg[PREFIX]}/bin/trustbridge" &
+  else
+    getxt "You can now launch '%s'\n" "${instcfg[PREFIX]}/bin/trustbridge"
   fi
 }
 

http://wald.intevation.org/projects/trustbridge/