X-Reportbug-Version: 3.15
X-Debbugs-Cc: [EMAIL PROTECTED]
Package: initscripts
Version: 2.86.ds1-1.1
Severity: wishlist


Hello,

here's a patch I'm using to preserve a bigger entropy-store across reboots.
Helps on machines, which have big (but seldom) requests to /dev/random.


Regards,

Phil



--- /etc/init.d/urandom 2005-04-27 15:12:18.000000000 +0200
+++ /etc/init.d/urandom.dpkg-new        2005-08-10 18:58:32.000000000 +0200
@@ -11,24 +11,12 @@
 VERBOSE=yes
 [ -f /etc/default/rcS ] && . /etc/default/rcS

-POOLSIZE=512
+POOLSIZE=4096
 if [ -f /proc/sys/kernel/random/poolsize ]
 then
        POOLSIZE="`cat /proc/sys/kernel/random/poolsize`"
 fi

+if [ -f /var/lib/urandom/random-seed ]
+then
+       SAVEDSIZE=`find /var/lib/urandom/random-seed -printf "%s"`
+
+       if [ $SAVEDSIZE -gt $POOLSIZE ]
+       then
+               echo $POOLSIZE > /proc/sys/kernel/random/poolsize
+               POOLSIZE=$SAVEDSIZE
+       fi
+fi
+
+
 case "$1" in
        start|"")
                if [ "$VERBOSE" != no ]



-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (600, 'testing'), (50, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-1) (ignored: 
LC_ALL set to de_AT)

Versions of packages initscripts depends on:
ii  coreutils                 5.2.1-2ubuntu1 The GNU core utilities
ii  dpkg                      1.13.11        package maintenance system for Deb
ii  e2fsprogs                 1.38-1.1       ext2 file system utilities and lib
ii  libc6                     2.3.5-4        GNU C Library: Shared libraries an
ii  util-linux                2.12p-7        Miscellaneous system utilities

initscripts recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to