Check-in Number:
|
3320 | |
Date: |
2003-Apr-04 18:36:00 (local)
2003-Apr-04 16:36:00 (UTC) |
User: | rse |
Branch: | |
Comment: |
1. Make sure "shtool rotate" does still correctly determine the size of
a file if its filename contains whitespaces.
2. Consistently use "/bin/ls" instead of "ls" internally to avoid
problems with other "ls" in PATH while still not becoming unportable
(because "/bin/ls" is really on every reasonable Unix-style platform the
"ls" command). |
Tickets: |
|
Inspections: |
|
Files: |
|
ossp-pkg/shtool/ChangeLog 1.183 -> 1.184
--- ChangeLog 2003/02/22 12:27:20 1.183
+++ ChangeLog 2003/04/04 16:36:00 1.184
@@ -9,7 +9,18 @@
ChangeLog
- Changes between 1.6.2 and 2.0b0 (02-Nov-2002 to xx-Feb-2003):
+ Changes between 1.6.2 and 2.0b0 (02-Nov-2002 to xx-Apr-2003):
+
+ *) Make sure "shtool rotate" does still correctly determine
+ the size of a file if its filename contains whitespaces.
+ [Ralf S. Engelschall <rse@engelschall.com>,
+ Bill Campbell <bill@celestial.com>]
+
+ *) Consistently use "/bin/ls" instead of "ls" internally to avoid
+ problems with other "ls" in PATH while still not becoming
+ unportable (because "/bin/ls" is really on every reasonable
+ Unix-style platform the "ls" command).
+ [Ralf S. Engelschall <rse@engelschall.com>]
*) Enhance %u, %U, %g and %G expansions of "shtool echo -e"
by also trying the Solaris/Linux "getent" command.
|
|
ossp-pkg/shtool/sh.mdate 1.12 -> 1.13
--- sh.mdate 2003/02/11 12:56:40 1.12
+++ sh.mdate 2003/04/04 16:36:01 1.13
@@ -53,10 +53,10 @@
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
|
|
ossp-pkg/shtool/sh.rotate 1.5 -> 1.6
--- sh.rotate 2003/02/11 13:00:50 1.5
+++ sh.rotate 2003/04/04 16:36:01 1.6
@@ -182,8 +182,9 @@
# 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
|
|
ossp-pkg/shtool/sh.slo 1.19 -> 1.20
--- sh.slo 2003/02/11 13:00:50 1.19
+++ sh.slo 2003/04/04 16:36:01 1.20
@@ -91,7 +91,7 @@
# 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]* )
|
|