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

Petter Reinholdtsen pere at hungry.com
Fri Jul 2 23:29:19 UTC 2010


I gave this another try, and believe this code should work, using only
ls and the shell builtin set.

                # Handle locally increased pool size
                set -- $(LANG=C ls -l "$SAVEDFILE")
                SAVEDSIZE="$5"

Works for me.  Does it work for you too?

[Henrique de Moraes Holschuh]
> IMO, the script needs to be changed to depend on "ls" only.  Drop
> the use of "find".  And have it depend only on udev.

I agree.  But, for this to work, this part of the script need to be
removed from the start block, as it require a writable /var/:

        # Hm, why is the saved pool re-created at boot? [pere 2009-09-03]
        umask 077
        dd if=/dev/urandom of=$SAVEDFILE bs=$POOLSIZE count=1 >/dev/null 2>&1
        ES=$?
        umask 022

Anyone got any idea why the saved pool is saved at boot, and not only
on shutdown?

Happy hacking,
-- 
Petter Reinholdtsen





More information about the Pkg-sysvinit-devel mailing list