[arch-projects] [initscripts] [PATCH] rc.sysinit: Fix Initializing Random Seed

Kurt J. Bosch kjb-temp-2009 at alpenjodel.de
Sun Jun 26 13:26:19 EDT 2011


Seblu, 2011-06-26 19:18:
> On Sun, Jun 26, 2011 at 7:08 PM, Kurt J. Bosch
> <kjb-temp-2009 at alpenjodel.de>  wrote:
>> ---
>>   rc.sysinit |    2 +-
>>   1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/rc.sysinit b/rc.sysinit
>> index a6a5fa5..2d0fdc1 100755
>> --- a/rc.sysinit
>> +++ b/rc.sysinit
>> @@ -209,7 +209,7 @@ status "Activating Swap" swapon -a
>>   RANDOM_SEED=/var/lib/misc/random-seed
>>   [[ -f $RANDOM_SEED ]]&&
>>         status "Initializing Random Seed" \
>> -               cat $RANDOM_SEED>  /dev/urandom
>> +               eval 'cat $RANDOM_SEED>  /dev/urandom'
>>
>>   stat_busy "Removing Leftover Files"
>>         rm -rf /etc/{nologin,shutdownpid} /forcefsck /tmp/* /tmp/.*&>/dev/null
>> --
>> 1.7.1
>>
>>
>
> why not  : echo -nE "$RANDOM_SEED">  /dev/urandom  ?
>
>
NACK
To get rid of the cat we would need:

eval 'echo -nE "$(< $RANDOM_SEED)" > /dev/urandom'

The redirection won't work without eval because status is already 
redirecting to /dev/null.

-- 
Kurt


More information about the arch-projects mailing list