Index: ossp-pkg/shtool/ChangeLog RCS File: /v/ossp/cvs/ossp-pkg/shtool/ChangeLog,v rcsdiff -q -kk '-r1.183' '-r1.184' -u '/v/ossp/cvs/ossp-pkg/shtool/ChangeLog,v' 2>/dev/null --- 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 , + Bill Campbell ] + + *) 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 ] *) Enhance %u, %U, %g and %G expansions of "shtool echo -e" by also trying the Solaris/Linux "getent" command. Index: ossp-pkg/shtool/sh.mdate RCS File: /v/ossp/cvs/ossp-pkg/shtool/sh.mdate,v rcsdiff -q -kk '-r1.12' '-r1.13' -u '/v/ossp/cvs/ossp-pkg/shtool/sh.mdate,v' 2>/dev/null --- 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 Index: ossp-pkg/shtool/sh.rotate RCS File: /v/ossp/cvs/ossp-pkg/shtool/sh.rotate,v rcsdiff -q -kk '-r1.5' '-r1.6' -u '/v/ossp/cvs/ossp-pkg/shtool/sh.rotate,v' 2>/dev/null --- 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 Index: ossp-pkg/shtool/sh.slo RCS File: /v/ossp/cvs/ossp-pkg/shtool/sh.slo,v rcsdiff -q -kk '-r1.19' '-r1.20' -u '/v/ossp/cvs/ossp-pkg/shtool/sh.slo,v' 2>/dev/null --- 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]* )