[arch-projects] [initscripts] [PATCH 11/13] Simplify random seed file creation

Kurt J. Bosch kjb-temp-2009 at alpenjodel.de
Fri Jun 24 05:15:01 EDT 2011


---
 rc.shutdown |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/rc.shutdown b/rc.shutdown
index 39adaad..b0b97d6 100755
--- a/rc.shutdown
+++ b/rc.shutdown
@@ -23,9 +23,7 @@ kill_everything shutdown
 
 stat_busy "Saving Random Seed"
 RANDOM_SEED=/var/lib/misc/random-seed
-[[ -d ${RANDOM_SEED%/*} ]] || mkdir -p ${RANDOM_SEED%/*}
-: > $RANDOM_SEED
-chmod 0600 $RANDOM_SEED
+install -TDm 0600 <(:) $RANDOM_SEED
 POOL_FILE=/proc/sys/kernel/random/poolsize
 if [[ -r $POOL_FILE ]]; then
 	read POOL_SIZE <$POOL_FILE
-- 
1.7.1



More information about the arch-projects mailing list