[PATCH 2 of 3] (issue54) Disable start after installation when root

Wald Commits scm-commit at wald.intevation.org
Thu Sep 25 15:57:31 CEST 2014


# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1411653397 -7200
# Node ID 3b433a3500929361f99d91453ef692ece7a9547a
# Parent  7ea3a4c0e2ae0facb48d814d550cbe02da6e8762
(issue54) Disable start after installation when root.

diff -r 7ea3a4c0e2ae -r 3b433a350092 packaging/linux-installer.inc
--- 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
 }
 


More information about the Trustbridge-commits mailing list