Quellcode durchsuchen

upgrade to latest shtool snapshot in order to fix rotate command if a filename contains whitespaces

Ralf S. Engelschall vor 23 Jahren
Ursprung
Commit
d71c30cdc3
2 geänderte Dateien mit 13 neuen und 12 gelöschten Zeilen
  1. 1 1
      openpkg/openpkg.spec
  2. 12 11
      openpkg/shtool

+ 1 - 1
openpkg/openpkg.spec

@@ -39,7 +39,7 @@
 #   o any cc(1)
 
 #   the package version/release
-%define       V_openpkg 20030403
+%define       V_openpkg 20030404
 
 #   the used software versions
 %define       V_rpm     4.0.2

+ 12 - 11
openpkg/shtool

@@ -6,7 +6,7 @@
 ##  See http://www.gnu.org/software/shtool/ for more information.
 ##  See ftp://ftp.gnu.org/gnu/shtool/ for latest version.
 ##
-##  Version:  2.0b0 (22-Feb-2003)
+##  Version:  2.0b0 (04-Apr-2003)
 ##  Contents: all available modules
 ##
 
@@ -65,7 +65,7 @@ if [ $# -eq 0 ]; then
     exit 1
 fi
 if [ ".$1" = ".-h" -o ".$1" = ".--help" ]; then
-    echo "This is GNU shtool, version 2.0b0 (22-Feb-2003)"
+    echo "This is GNU shtool, version 2.0b0 (04-Apr-2003)"
     echo "Copyright (c) 1994-2003 Ralf S. Engelschall <rse@engelschall.com>"
     echo "Report bugs to <bug-shtool@gnu.org>"
     echo ''
@@ -128,7 +128,7 @@ if [ ".$1" = ".-h" -o ".$1" = ".--help" ]; then
     exit 0
 fi
 if [ ".$1" = ".-v" -o ".$1" = ."--version" ]; then
-    echo "GNU shtool 2.0b0 (22-Feb-2003)"
+    echo "GNU shtool 2.0b0 (04-Apr-2003)"
     exit 0
 fi
 if [ ".$1" = ".-r" -o ".$1" = ."--recreate" ]; then
@@ -906,10 +906,10 @@ mdate )
     LC_TIME=C; export LC_TIME
     
     #   get the extended ls output of the file or directory.
-    if ls -L /dev/null >/dev/null 2>&1; then
-        set - x`ls -L -l -d $fod`
+    if /bin/ls -L /dev/null >/dev/null 2>&1; then
+        set - x`/bin/ls -L -l -d $fod`
     else
-        set - x`ls -l -d $fod`
+        set - x`/bin/ls -l -d $fod`
     fi
     
     #   The month is at least the fourth argument
@@ -1911,8 +1911,9 @@ rotate )
         #   optionally take logfile size into account
         if [ ".$opt_s" != . ]; then
             #   determine size of logfile
-            set -- `ls -l $ldir/$file | sed -e 's; -> .*$;;' -e 's;[ 	][ 	]*; ;g'`
-            n=`expr $# - 4`
+            set -- `/bin/ls -l "$ldir/$file" | sed -e "s;$ldir/$file;;" |\
+                    sed -e 's; -> .*$;;' -e 's;[ 	][ 	]*; ;g'`
+            n=`expr $# - 3`
             eval "size=\`echo \${$n}\`"
     
             #   skip logfile if size is still too small
@@ -2261,14 +2262,14 @@ tarball )
                 echo "chown -R $opt_u $tmpdir/$tarname >/dev/null 2>&1" 2>&1
             fi
             chown -R $opt_u $tmpdir/$tarname >/dev/null 2>&1 ||\
-            echo "$msgprefix:Warning: cannot set user name \`$opt_u' (would require root privileges)"
+            echo "$msgprefix:Warning: cannot set user name \`$opt_u' (would require root priviledges)"
         fi
         if [ ".$opt_g" != . ]; then
             if [ ".$opt_t" = .yes ]; then
                 echo "chgrp -R $opt_g $tmpdir/$tarname >/dev/null 2>&1" 2>&1
             fi
             chgrp -R $opt_g $tmpdir/$tarname >/dev/null 2>&1 ||\
-            echo "$msgprefix:Warning: cannot set group name \`$opt_g' (would require root privileges)"
+            echo "$msgprefix:Warning: cannot set group name \`$opt_g' (would require root priviledges)"
         fi
         if [ ".$opt_t" = .yes ]; then
             echo "(cd $tmpdir && $prg_find $tarname -type f -depth -print | sort | xargs $prg_tar cf -) | cat $compress >$tmpfile.out" 1>&2
@@ -2827,7 +2828,7 @@ slo )
     
             #    search the file
             OIFS3="$IFS"; IFS="$DIFS"
-            for file in '' `cd $dir && ls lib${lib}.* 2>/dev/null`; do
+            for file in '' `cd $dir && /bin/ls lib${lib}.* 2>/dev/null`; do
                  [ ".$file" = . ] && continue
                  case $file in
                      *.so|*.so.[0-9]*|*.sl|*.sl.[0-9]* )