[5118] | 1 | #!/bin/bash |
---|
| 2 | |
---|
[5935] | 3 | |
---|
| 4 | echo "pour utiliser ce script il faut demander a la hotline d'avoir son login ajoute au reseau ccfr " |
---|
| 5 | |
---|
| 6 | echo "activation du module ccfr " |
---|
| 7 | module load ccfr |
---|
| 8 | |
---|
| 9 | |
---|
[5118] | 10 | echo "Quel est votre login sur ada " |
---|
| 11 | echo -n "Votre reponse : " |
---|
| 12 | read loginIDRIS |
---|
| 13 | |
---|
| 14 | cd /ccc/work/cont003/igcmg/igcmg |
---|
| 15 | |
---|
| 16 | |
---|
| 17 | echo " Resultat du rsync en dry-run : " |
---|
| 18 | echo "" |
---|
| 19 | |
---|
[5935] | 20 | rsync -n --omit-dir-times -vrltgoD --progress --delete -e "ssh -ax -o ClearAllForwardings=yes -c aes128-ctr" --exclude='LMDZOR_v6/ciclad/' --exclude='LMDZOR_v6/jean-zay/' TRAINING/MODIPSL_HandsOn_20210129/ ${loginIDRIS}@jean-zay-ccfr.idris.fr:/gpfswork/rech/psl/commun/TRAINING/MODIPSL_HandsOn_20210129/ |
---|
[5118] | 21 | |
---|
| 22 | |
---|
| 23 | echo "Voulez vous effectuer les actions listees ci dessus oui/non ?" |
---|
| 24 | echo -n " Votre reponse : " |
---|
| 25 | read reponse |
---|
| 26 | |
---|
| 27 | case ${reponse} in |
---|
| 28 | |
---|
| 29 | oui|OUI|o) |
---|
[5935] | 30 | rsync --omit-dir-times -vrltgoD --progress --delete -e "ssh -ax -o ClearAllForwardings=yes -c aes128-ctr" --exclude='LMDZOR_v6/ciclad/' --exclude='LMDZOR_v6/jean-zay/' TRAINING/MODIPSL_HandsOn_20210129/ ${loginIDRIS}@jean-zay-ccfr.idris.fr:/gpfswork/rech/psl/commun/TRAINING/MODIPSL_HandsOn_20210129 |
---|
[5118] | 31 | echo "FIN SCRIPT SYNCHRO ! nous passons à la mise à jour des droits " |
---|
| 32 | ;; |
---|
| 33 | non|NON|n) |
---|
| 34 | |
---|
| 35 | echo "PAS SCRIPT SYNCHRO ! nous passons à la mise à jour des droits " |
---|
| 36 | ;; |
---|
| 37 | *) |
---|
| 38 | echo "Reponse non reconnue" |
---|
| 39 | ;; |
---|
| 40 | esac |
---|
| 41 | |
---|
[5935] | 42 | ssh ${loginIDRIS}@jean-zay-ccfr.idris.fr "setfacl -R -m u::rwx,u:rlmd007:rwx,u:rces009:rwx,u:rgzi017:rwx,u:rpsl003:rwx,u:rces333:rwx,u:rpsl500:rwx,u:rpsl592:rwx,u:rces981:rwx,u:rgzi002:rwx,u:rpsl951:rwx,u:rgzi023:rwx,u:rgzi028:rwx,u:rdzt910:rwx,u:romr009:rwx,u:rgzi026:rwx,u:rpsl655:rwx,u:rron171:rwx,u:rgzi016:rwx,g::r-x,o::r-x,m::rwx /gpfswork/rech/psl/commun/TRAINING" |
---|
[5118] | 43 | |
---|
| 44 | |
---|
| 45 | |
---|
| 46 | echo "Verification des droits sur les fichiers cote TGCC" |
---|
| 47 | ccc_shspace_chmod userread /ccc/work/cont003/igcmg/igcmg/TRAINING |
---|
| 48 | is_problem=` ccc_shspace_modck TRAINING |grep ccc_shspace_chmod |wc -l` |
---|
| 49 | if [ "x${is_problem}" != "x0" ] |
---|
| 50 | then |
---|
| 51 | echo "Il y a un probleme de droit sur un repertoire qui ne vous appartient pas" |
---|
| 52 | echo "vous pouvez utiliser la commande ccc_shspace_modck TRAINING pour savoir qui doit mettre a jour les droits" |
---|
| 53 | fi |
---|