]> gitweb.pimeys.fr Git - config-20-100.git/commitdiff
[umask] Patch : problème de préfixe
authorVincent Le Gallic <legallic@crans.org>
Fri, 27 Sep 2013 16:37:10 +0000 (18:37 +0200)
committerVincent Le Gallic <legallic@crans.org>
Fri, 27 Sep 2013 16:41:20 +0000 (18:41 +0200)
.bashrc
.umaskrc

diff --git a/.bashrc b/.bashrc
index b738ade1c1000d0d03bf76ff81761cc2e79d8e22..d688ea1dc94ee69e79e54d50f6ae5425b77ed912 100644 (file)
--- 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
 }
index fc712dcfef35e714334d38951f61db657fe38fe5..cb80a80ae64521c1141db1bc9187f41540b2fffc 100644 (file)
--- a/.umaskrc
+++ b/.umaskrc
 #------------------------------------------------------------------------------
 
 #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