]> gitweb.fluxo.info Git - simplepkg.git/commitdiff
common.sh: permission, owner and group reading fix on directories
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Thu, 5 Apr 2007 15:31:28 +0000 (15:31 +0000)
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Thu, 5 Apr 2007 15:31:28 +0000 (15:31 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@241 04377dda-e619-0410-9926-eae83683ac58

trunk/lib/common.sh
trunk/src/jail-commit
trunk/src/templatepkg

index 6d2326269d2680ba712a85fcfbc3f74a067eb376..7d9444b4da38a7e9ee3556cbf4b706d33754ceed 100644 (file)
@@ -391,7 +391,7 @@ function numeric_perm {
   # just a bit of forbidden secrets
 
   if [ -a "$1" ]; then
-    ls -ln $1| awk '{ print $1 }' | \
+    ls -lnd $1 | awk '{ print $1 }' | \
     sed -e 's/^.//' -e 's/r/4/g' -e 's/w/2/g' -e 's/x/1/g' \
         -e 's/-/0/g' -e 's/\(.\)\(.\)\(.\)/\1+\2+\3/g' |   \
     fold -w5 | bc -l | xargs | sed -e 's/ //g'
@@ -405,7 +405,7 @@ function get_owner {
   # usage: get_owner <file>
 
   if [ -a "$1" ]; then
-    ls -ln $1 | awk '{ print $3 }'
+    ls -lnd $1 | awk '{ print $3 }'
   fi
 
 }
@@ -416,7 +416,7 @@ function get_group {
   # usage: get_group <file>
 
   if [ -a "$1" ]; then
-    ls -ln $1 | awk '{ print $4 }'
+    ls -lnd $1 | awk '{ print $4 }'
   fi
 
 }
index ce34d92165f38e301c31099fd1fda5904a2f085a..c2d66b5daf799fdd9bc947146d048080bd894608 100755 (executable)
@@ -48,7 +48,7 @@ function template_merge {
   echo "" > $TEMPLATE_BASE.perms
   cd $TEMPLATE_BASE.d
 
-  for file in `find | grep -v -e "/.svn$" | grep -v -e "/.svn/"`; do
+  for file in `find | grep -v -e "/.svn$" | grep -v -e "/.svn/" | grep -v -e  "^\.$"`; do
 
     if [[ -e "$file" && -e "$1/$file" ]]; then
 
index c1b3b04ba1f8f61a84d41243d1620700620c4c33..b1847208fa8ce3f2d5b0d89f62011b712a51c49e 100755 (executable)
@@ -221,7 +221,7 @@ function template_update {
     exit 1
   fi
 
-  echo Checking package list for template `basename $TEMPLATE_BASE`
+  echo Checking package list for template `basename $TEMPLATE_BASE`...
 
   for package in `ls -1 $ROOT/var/log/packages/`; do
     pack=`package_name $package`