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

Seblu seblu at seblu.net
Sun Jun 26 13:39:24 EDT 2011


On Sun, Jun 26, 2011 at 7:26 PM, Kurt J. Bosch
<kjb-temp-2009 at alpenjodel.de> wrote:
> 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.

Hum no i read to quicly what was RANDOM_SEED... so why not just

cat < $RANDOM_SEED > /dev/urandom ?



-- 
Sébastien Luttringer
www.seblu.net


More information about the arch-projects mailing list