diff options
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | debian/hurd.postinst | 10 |
2 files changed, 8 insertions, 4 deletions
diff --git a/debian/changelog b/debian/changelog index 67f9aa8a..a40d865b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,8 @@ hurd (20111106-2) UNRELEASED; urgency=low * debian/control: - Use hurd-any instead of hurd-i386. - Recommend bf-utf-source to get more than just latin1 on the console. + * debian/hurd.postinst: Set up "*random" alternatives and generate seed on + first install too. -- Samuel Thibault <sthibault@debian.org> Sun, 06 Nov 2011 19:51:54 +0100 diff --git a/debian/hurd.postinst b/debian/hurd.postinst index 0e3a3b1a..000afe63 100644 --- a/debian/hurd.postinst +++ b/debian/hurd.postinst @@ -65,15 +65,17 @@ if [ "$1" = configure ] && [ "$2" ]; then ( cd /dev ; rm -f random urandom ) fi /usr/lib/hurd/setup-translators -K - update-alternatives --install /dev/random random /dev/random-hurd 10 \ - --slave /dev/urandom urandom /dev/urandom-hurd +fi + +update-alternatives --install /dev/random random /dev/random-hurd 10 \ + --slave /dev/urandom urandom /dev/urandom-hurd +if [ "$1" = configure ] ; then # Generate initial pool UMASK=`umask` umask 077 - [ -f /var/spool/random-seed ] || dd < /dev/urandom > /var/spool/random-seed bs=1 count=600 + [ -f /var/spool/random-seed ] || dd < /dev/urandom > /var/spool/random-seed bs=1 count=600 2> /dev/null # TODO: will need to run settrans -ga /dev/random at system stop to make # it save it back umask $UMASK fi - |