Commit 2dd504fd authored by PENGUEN Julien's avatar PENGUEN Julien

correction: remplacement commande "namei -l" par "ls -ld" pour compatibilité macos

parent 499b7d89
......@@ -692,13 +692,14 @@ function_check_permission_volume()
# return TRUE if permission OK else FALSE
volume=$1
volume_permissions=$(namei -l $volume | tail -n 1 | awk -F" " '{print $1}')
# volume_permissions=$(namei -l $volume | tail -n 1 | awk -F" " '{print $1}')
volume_permissions=$(ls -ld $volume | tail -n 1 | awk -F" " '{print $1}')
volume_type=${volume_permissions:0:1}
volume_owner_permissions=${volume_permissions:1:3}
volume_group_permissions=${volume_permissions:4:3}
volume_others_permissions=${volume_permissions:7:3}
volume_owner=$(namei -l $volume | tail -n 1 | awk -F" " '{print $2}')
volume_group_owner=$(namei -l $volume | tail -n 1 | awk -F" " '{print $3}')
volume_owner=$(ls -ld $volume | tail -n 1 | awk -F" " '{print $3}')
volume_group_owner=$(ls -ld $volume | tail -n 1 | awk -F" " '{print $4}')
user_name=$(whoami)
user_groups=$(id | awk -F " " '{print $3}' | sed 's/^groupes//g' | sed 's/[0-9()=]//g')
......@@ -1062,7 +1063,6 @@ if [[ $OUTPUT_FOLDER_LINUX != $OLD_OUTPUT_FOLDER_LINUX && $VOLUME_MOUNT != "NONE
OUTPUT_FOLDER_ON_VOLUME_MOUNT="TRUE"
result_check_permission=`function_check_permission_volume $VOLUME_MOUNT`
echo "result_check_permission=$result_check_permission"
if [ $result_check_permission != 'TRUE' ]; then
......
......@@ -693,13 +693,13 @@ function_check_permission_volume()
# return TRUE if permission OK else FALSE
volume=$1
volume_permissions=$(namei -l $volume | tail -n 1 | awk -F" " '{print $1}')
volume_permissions=$(ls -ld $volume | tail -n 1 | awk -F" " '{print $1}')
volume_type=${volume_permissions:0:1}
volume_owner_permissions=${volume_permissions:1:3}
volume_group_permissions=${volume_permissions:4:3}
volume_others_permissions=${volume_permissions:7:3}
volume_owner=$(namei -l $volume | tail -n 1 | awk -F" " '{print $2}')
volume_group_owner=$(namei -l $volume | tail -n 1 | awk -F" " '{print $3}')
volume_owner=$(ls -ld $volume | tail -n 1 | awk -F" " '{print $3}')
volume_group_owner=$(ls -ld $volume | tail -n 1 | awk -F" " '{print $4}')
user_name=$(whoami)
user_groups=$(id | awk -F " " '{print $3}' | sed 's/^groupes//g' | sed 's/[0-9()=]//g')
......@@ -1079,7 +1079,6 @@ if [[ $OUTPUT_FOLDER_MACOS != $OLD_OUTPUT_FOLDER_MACOS && $VOLUME_MOUNT != "NONE
OUTPUT_FOLDER_ON_VOLUME_MOUNT="TRUE"
result_check_permission=`function_check_permission_volume $VOLUME_MOUNT`
echo "result_check_permission=$result_check_permission"
if [ $result_check_permission != 'TRUE' ]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment