From 854fbfec92e9e35bdebaaa0bbd4ad89bff121450 Mon Sep 17 00:00:00 2001
From: Vincent Le Gallic <legallic@crans.org>
Date: Fri, 27 Sep 2013 18:37:10 +0200
Subject: [PATCH] =?UTF-8?q?[umask]=20Patch=20:=20probl=C3=A8me=20de=20pr?=
 =?UTF-8?q?=C3=A9fixe?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .bashrc  |  2 +-
 .umaskrc | 16 ++++++++--------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/.bashrc b/.bashrc
index b738ade..d688ea1 100644
--- a/.bashrc
+++ b/.bashrc
@@ -100,7 +100,7 @@ function cd {
         builtin cd "$@"
 	ret=$?
         if [ -f ~/.umaskrc ]; then
-            umask $(/usr/bin/awk 'BEGIN {pwd=ENVIRON["PWD"]; a=length(pwd); cmax=0} {if($1==pwd) {MASK=$2;exit}; c=length($1); if(c>a) {next}; if(substr(pwd,0,c)==$1 && c > cmax) {cmax=c; MASK=$2}} END {print MASK}' ~/.umaskrc) >/dev/null
+            umask $(/usr/bin/awk 'BEGIN {pwd=ENVIRON["PWD"]"/"; a=length(pwd); cmax=0} {if($1==pwd) {MASK=$2;exit}; c=length($1); if(c>a) {next}; if(substr(pwd,0,c+1)==$1 && c > cmax) {cmax=c; MASK=$2}} END {print MASK}' ~/.umaskrc) >/dev/null
         fi
         return $ret
 }
diff --git a/.umaskrc b/.umaskrc
index fc712dc..cb80a80 100644
--- a/.umaskrc
+++ b/.umaskrc
@@ -13,11 +13,11 @@
 #------------------------------------------------------------------------------
 
 #path                       #umask
-/                           022     #umask par défaut
-/usr/scripts                002     # Donne les droits d'écriture au groupe
-/git/                       002
-/var/lib/bcfg2              002
-/localhome/django/intranet  002
-/localhome/webdata          002
-/home/respbats/www          002
-/localhome/fortunes         002
+/                            022     #umask par défaut
+/usr/scripts/                002     # Donne les droits d'écriture au groupe
+/git/                        002
+/var/lib/bcfg2/              002
+/localhome/django/intranet/  002
+/localhome/webdata/          002
+/home/respbats/www/          002
+/localhome/fortunes/         002
-- 
GitLab