[arch-projects] [initscripts] [PATCH] rc.sysinit: Fix Initializing Random Seed
--- 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
On Sun, Jun 26, 2011 at 7:08 PM, Kurt J. Bosch <kjb-temp-2009@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 ? -- Sébastien Luttringer www.seblu.net
Seblu, 2011-06-26 19:18:
On Sun, Jun 26, 2011 at 7:08 PM, Kurt J. Bosch <kjb-temp-2009@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
On Sun, Jun 26, 2011 at 7:26 PM, Kurt J. Bosch <kjb-temp-2009@alpenjodel.de> wrote:
Seblu, 2011-06-26 19:18:
On Sun, Jun 26, 2011 at 7:08 PM, Kurt J. Bosch <kjb-temp-2009@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
On Sun, Jun 26, 2011 at 07:18:07PM +0200, Seblu wrote:
On Sun, Jun 26, 2011 at 7:08 PM, Kurt J. Bosch <kjb-temp-2009@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 ?
-- Sébastien Luttringer www.seblu.net
$RANDOM_SEED is a filename, not a string. I don't understand the eval here at all, but it's probably moot given the other recent patchwork...
participants (3)
-
Dave Reisner
-
Kurt J. Bosch
-
Seblu