source: TOOLS/SYNCHRO_SCRIPTS/synchro_igcmg_to_ergon @ 4137

Last change on this file since 4137 was 4137, checked in by acosce, 6 years ago

mise a jour des logins pour les acl en supprimant les logins surnumeraires de Laurent

File size: 2.9 KB
Line 
1#!/bin/bash
2
3echo "Quel est votre login sur ergon "
4echo -n "Votre reponse : "
5read loginIDRIS
6
7cd /ccc/work/cont003/igcmg/igcmg
8
9
10echo " Resultat du rsync en dry-run : "
11echo ""
12#
13#rsync -n --omit-dir-times -vrltgoD --progress --delete -e "ssh -ax -o ClearAllForwardings=yes -c aes128-ctr"  --exclude='IGCM/CMIP6/*' IGCM ${loginIDRIS}@ergon.idris.fr:/linkhome/rech/psl/rpsl035/
14rsync -n --omit-dir-times -vrltgoD --progress --delete -e "ssh -ax -o ClearAllForwardings=yes -c aes128-ctr"  --exclude='IGCM/CMIP6/*' IGCM ${loginIDRIS}@ergon:/linkhome/rech/psl/rpsl035/
15
16echo "Voulez vous effectuer les actions listees ci dessus oui/non ?"
17echo -n " Votre reponse : "
18read reponse
19
20case ${reponse} in
21
22oui|OUI|o)
23rsync --omit-dir-times -vrltgoD --progress  --delete -e "ssh -ax -o ClearAllForwardings=yes -c aes128-ctr"  --exclude='IGCM/CMIP6/*'  IGCM ${loginIDRIS}@ergon:/linkhome/rech/psl/rpsl035/
24;;
25non|NON|n)
26
27
28echo "Voulez vous sauvegarder la liste des actions dans un fichier oui/non ?"
29echo -n "Votre reponse : "
30read reponse2
31
32case ${reponse2} in
33
34oui|OUI|o) 
35VAR=`date +%Y-%m-%d`
36NAME=`whoami`
37rsync -n --omit-dir-times -vrltgoD --progress --delete -e "ssh -ax -o ClearAllForwardings=yes -c aes128-ctr"  --exclude='IGCM/CMIP6/*' IGCM ${loginIDRIS}@ergon:/linkhome/rech/psl/rpsl035/ > /ccc/work/cont003/igcmg/igcmg/TMP_SYNC/liste_action_ergon_${NAME}_${VAR}.txt
38echo "vous trouverez la liste dans /ccc/work/cont003/igcmg/igcmg/TMP_SYNC/liste_action_ergon_${NAME}_${VAR}.txt"
39;;
40non|NON|n) 
41;;
42*)
43echo "Reponse non reconnue"
44;;
45esac
46
47
48echo "FIN SCRIPT SYNCHRO ! nous passons à la mise à jour des droits "
49;;
50*)
51echo "Reponse non reconnue"
52;;
53esac
54
55echo "Mise a jour des droits sur les repertoires de donnees (IDRIS), presse entree"
56read pause
57
58
59#echo 'launch :: '
60#echo ssh ${loginIDRIS}@ada.idris.fr "setfacl -R -m u::rwx,u:rpsl500:rwx,u:rces009:rwx,u:rces061:rwx,u:rpsl592:rwx,u:rpsl035:rwx,u:rces131:rwx,u:rpsl003:rwx,u:rgzi003:rwx,u:rpsl944:rwx,u:rpsl035:rwx,u:romr006:rwx,u:rgzi002:rwx,u:rpsl946:rwx,u:rces452:rwx,u:rpsl388:rwx,u:rlmd833:rwx,u:rces311:rwx,u:rdzt001:rwx,u:rgzi017:rwx,u:rpsl951:rwx,g::r-x,o::r-x,m::rwx /linkhome/rech/psl/rpsl035/IGCM/"
61ssh ${loginIDRIS}@ergon "setfacl -R -m u::rwx,u:rpsl500:rwx,u:rces009:rwx,u:rces061:rwx,u:rgzi023:rwx,u:rpsl592:rwx,u:rces131:rwx,u:rpsl003:rwx,u:rgzi003:rwx,u:rpsl944:rwx,u:rpsl035:rwx,u:romr006:rwx,u:rgzi028:rwx,u:rgzi002:rwx,u:rpsl946:rwx,u:rces452:rwx,u:rlmd007:rwx,u:rpsl388:rwx,u:rlmd833:rwx,u:rces311:rwx,u:rdzt001:rwx,u:rgzi017:rwx,u:rces981:rwx,u:rpsl951:rwx,g::r-x,o::r-x,m::rwx /linkhome/rech/psl/rpsl035/IGCM/"
62
63echo "Verification des droits sur les fichiers cote TGCC"
64ccc_shspace_chmod userread /ccc/work/cont003/igcmg/igcmg/IGCM
65is_problem=` ccc_shspace_modck IGCM |grep ccc_shspace_chmod |wc -l`
66if [ "x${is_problem}" != "x0" ] 
67then
68  echo "Il y a un probleme de droit sur un repertoire qui ne vous appartient pas"
69  echo "vous pouvez utiliser la commande ccc_shspace_modck IGCM pour savoir qui doit mettre a jour les droits"
70fi 
Note: See TracBrowser for help on using the repository browser.