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

Henrique de Moraes Holschuh hmh at debian.org
Thu Jul 1 16:57:15 UTC 2010


On Thu, 01 Jul 2010, Petter Reinholdtsen wrote:
> [Michael Biebl]
> > 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.
> 
> It is to handle those increasing the pool size in the kernel and make
> the change last across boots.
> 
> > that said, given your code above, I get differing results for this
> > simple example:
> > 
> > $ echo foo > /tmp/bar
> > $ find /tmp/bar -printf %s
> > 4
> > $ ls -s --block-size=1 /tmp/bar | cut -d' ' -f1
> > 4096
> 
> How strange.  When I test it, I get this result:
> 
> % (f=/var/lib/urandom/random-seed; find $f -printf "%s\n"; ls -s --block-size=1 $f|cut -d" " -f1)
> 4096
> 4096
> %
> 
> Perhaps ls round up to the nearest block?  Any other ideas on how to
> fix this with the tools available on /?

If you use -s, it gives you the ALLOCATED size, it is in the manpage.

Given how critical this thing is, I am all for a 1KiB util written in C that
does what is required, instead of relying in "LC_ALL=C ls -l foo", etc.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh





More information about the Pkg-sysvinit-devel mailing list