[ 
https://issues.apache.org/jira/browse/RANGER-1275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Qiang Zhang updated RANGER-1275:
--------------------------------
    Description: 
At the beginning of the security-admin/scripts/setup.sh file there are three 
logical errors.
1. The judgment logic that the install.properties file exists is wrong. The 
reason for the error is that the author doesn't understand the meaning of the 
"$?" correctly in shell script. 
2. The "/var/run/ranger" path is very important. So the program should 
determine whether the directory to create success.
3. The following error occurred if the 'log "$PROPFILE file not found....!!";' 
could be executed.
   ./setup.sh: line 27: log: command not found

Reproducible Steps:
-------------------------------------------------------------------------------
1. Run "mv install.properties install.properties.bak" command. 
2. Run setup.sh. 
Result:
The following statement was not executed.
log "$PROPFILE file not found....!!";
exit 1;
---------------------------------------------------------------------------------------
1. Comment out the line 26 and 29 lines and add "exit 0" at the 30 line in the 
security-admin/scripts/setup.sh file. 
2. Run setup.sh.
Result.
./setup.sh: line 27: log: command not found

  was:
1. The judgment logic that the install.properties file exists is wrong. The 
reason for the error is that the author doesn't understand the meaning of the 
"$?" correctly in shell script. 
2. The "/var/run/ranger" path is very important. So the program should 
determine whether the directory to create success.

Reproducible Steps:
1. Run "mv install.properties install.properties.bak" command. 
2. Run setup.sh. 
Result:
The following statement was not executed.
log "$PROPFILE file not found....!!";
exit 1;

        Summary: At the beginning of the security-admin/scripts/setup.sh file 
there are three logical errors.  (was: At the beginning of the 
security-admin/scripts/setup.sh file there are two logical errors.)

> At the beginning of the security-admin/scripts/setup.sh file there are three 
> logical errors.
> --------------------------------------------------------------------------------------------
>
>                 Key: RANGER-1275
>                 URL: https://issues.apache.org/jira/browse/RANGER-1275
>             Project: Ranger
>          Issue Type: Bug
>          Components: admin
>            Reporter: Qiang Zhang
>            Assignee: Qiang Zhang
>              Labels: patch
>
> At the beginning of the security-admin/scripts/setup.sh file there are three 
> logical errors.
> 1. The judgment logic that the install.properties file exists is wrong. The 
> reason for the error is that the author doesn't understand the meaning of the 
> "$?" correctly in shell script. 
> 2. The "/var/run/ranger" path is very important. So the program should 
> determine whether the directory to create success.
> 3. The following error occurred if the 'log "$PROPFILE file not 
> found....!!";' could be executed.
>    ./setup.sh: line 27: log: command not found
> Reproducible Steps:
> -------------------------------------------------------------------------------
> 1. Run "mv install.properties install.properties.bak" command. 
> 2. Run setup.sh. 
> Result:
> The following statement was not executed.
> log "$PROPFILE file not found....!!";
> exit 1;
> ---------------------------------------------------------------------------------------
> 1. Comment out the line 26 and 29 lines and add "exit 0" at the 30 line in 
> the security-admin/scripts/setup.sh file. 
> 2. Run setup.sh.
> Result.
> ./setup.sh: line 27: log: command not found



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to