forked from ungleich-public/cdist
__acl: avoid duplication and safer sed for last occurence replacement
This commit is contained in:
parent
8b3c84dfef
commit
7924c1339c
1 changed files with 4 additions and 2 deletions
|
@ -41,10 +41,12 @@ do
|
||||||
then
|
then
|
||||||
if [ "$is_dir" = '1' ]
|
if [ "$is_dir" = '1' ]
|
||||||
then
|
then
|
||||||
acl="$( echo "$acl" | sed 's/X$/x/' )"
|
rep=x
|
||||||
else
|
else
|
||||||
acl="$( echo "$acl" | sed 's/X$/-/' )"
|
rep=-
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
acl="$( echo "$acl" | sed -r "s/(.*)X/\1$rep/" )"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if echo "$parameter" | grep -Eq '(mask|other)'
|
if echo "$parameter" | grep -Eq '(mask|other)'
|
||||||
|
|
Loading…
Reference in a new issue