#!/bin/bash cd /ccc/work/cont003/igcmg/igcmg echo " Resultat du rsync en dry-run : " echo "" rsync -n -vrltgoD --progress --delete -e "ssh -ax -o ClearAllForwardings=yes -c blowfish" --exclude='IGCM/CMIP6/*' IGCM igcmg@ciclad.ipsl.jussieu.fr:/prodigfs/ipslfs/igcmg echo "Voulez vous effectuer les actions listees ci dessus oui/non ?" echo -n " Votre reponse : " read reponse case ${reponse} in oui|OUI|o) rsync -vrltgoD --progress --chmod=o-w --chmod=g-w --chmod=u-w --delete -e "ssh -ax -o ClearAllForwardings=yes -c blowfish" --exclude='IGCM/CMIP6/*' IGCM igcmg@ciclad.ipsl.jussieu.fr:/prodigfs/ipslfs/igcmg ;; non|NON|n) echo "Voulez vous sauvegarder la liste des actions dans un fichier oui/non ?" echo -n "Votre reponse : " read reponse2 case ${reponse2} in oui|OUI|o) VAR=`date +%Y-%m-%d` NAME=`whoami` rsync -n -vrltgoD --progress --delete -e "ssh -ax -o ClearAllForwardings=yes -c blowfish" --exclude='IGCM/CMIP6/*' IGCM igcmg@ciclad.ipsl.jussieu.fr:/prodigfs/ipslfs/igcmg > /ccc/work/cont003/igcmg/igcmg/TMP_SYNC/liste_action_ciclad_${NAME}_${VAR}.txt echo "vous trouverez la liste dans /ccc/work/cont003/igcmg/igcmg/TMP_SYNC/liste_action_ciclad_${NAME}_${VAR}.txt" ;; non|NON|n) ;; *) echo "Reponse non reconnue" ;; esac echo "FIN SCRIPT SYNCHRO ! nous passons à la mise à jour des droits " ;; *) echo "Reponse non reconnue" ;; esac echo "Verification des droits des repertoires TGCC" ccc_shspace_chmod userread /ccc/work/cont003/igcmg/igcmg/IGCM is_problem=` ccc_shspace_modck IGCM |grep ccc_shspace_chmod |wc -l` if [ "x${is_problem}" != "x0" ] then echo "Il y a un probleme de droit sur un repertoire qui ne vous appartient pas" echo "vous pouvez utiliser la commande ccc_shspace_modck IGCM pour savoir qui doit mettre a jour les droits" fi