Skip to content
Snippets Groups Projects
Commit 854fbfec authored by Vincent Le gallic's avatar Vincent Le gallic
Browse files

[umask] Patch : problème de préfixe

parent d23bdca3
No related branches found
No related tags found
No related merge requests found
......@@ -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
}
......
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment