[Pkg-sysvinit-devel] Bug#587665: wrong PATH in urandom, find is in /usr/bin

Michael Biebl biebl at debian.org
Thu Jul 1 00:10:24 UTC 2010

On 01.07.2010 01:40, Petter Reinholdtsen wrote:
> [Michael Biebl]
>> Agreed, if it can be changed to work without find (or anything from
>> /usr/), this is of course the better solution.
> This is the problematic line:
>   SAVEDSIZE="$(find "$SAVEDFILE" -printf "%s")"
> The find line prints the size of the file in bytes.
> Not quite sure what the best option is, but this line seem to work
> too, using ls and cut from /bin/.
>   SAVEDSIZE="$(ls -s --block-size=1 "$SAVEDFILE" | cut -d' ' -f1)"
> Anyone got a better idea?

TBH, I'm not actually sure what all the code in /etc/init.d/urandom is supposed
to do and why SAVEDSIZE is necessary at all.

that said, given your code above, I get differing results for this simple example:

$ echo foo > /tmp/bar
$ find /tmp/bar -printf %s
$ ls -s --block-size=1 /tmp/bar | cut -d' ' -f1

Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-sysvinit-devel/attachments/20100701/114ad2a8/attachment.pgp>

More information about the Pkg-sysvinit-devel mailing list