You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2018/03/29 21:54:06 UTC

[GitHub] mitchell852 closed pull request #2071: TO postinstall -- use builtin perl var to check for root user

mitchell852 closed pull request #2071: TO postinstall -- use builtin perl var to check for root user
URL: https://github.com/apache/incubator-trafficcontrol/pull/2071
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/traffic_ops/install/bin/_postinstall b/traffic_ops/install/bin/_postinstall
index 1f30872ad..25e17c7e3 100755
--- a/traffic_ops/install/bin/_postinstall
+++ b/traffic_ops/install/bin/_postinstall
@@ -821,7 +821,7 @@ sub main {
     }
 
     # check if the user running postinstall is root
-    if ( $ENV{USER} ne "root" ) {
+    if ( $> != 0 ) {
         errorOut("You must run this script as the root user");
     }
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services