Browse Source

Benjamin Schieder:


			
			
				rocklinux
			
			
		
Benjamin Schieder 19 years ago
parent
commit
30f76b34cc
1 changed files with 10 additions and 3 deletions
  1. +10
    -3
      package/base/device-mapper/etc_conf_dm_initrd_dm

+ 10
- 3
package/base/device-mapper/etc_conf_dm_initrd_dm

@ -198,15 +198,22 @@ while read device mountpoint status ; do
echo "setting up encryption"
echo -n "gathering entropy ... "
ent=""
while [ -z "${ent:128}" ] ; do
read -n 1 e < /dev/random
while read -n 1 -t 1 e < /dev/random ; do
[ -n "${ent:128}" ] && break
[ "${e}" == "\n" ] && continue
ent="${ent}${e}"
echo -n "."
done
[ -z "${ent:128}" ] && echo -n " switching to urandom ... "
while read -n 1 e < /dev/urandom ; do
[ -n "${ent:128}" ] && break
[ "${e}" == "\n" ] && continue
ent="${ent}${e}"
echo -n "."
done
ent="`echo ${ent} | md5sum`"
ent=${ent%% *}
echo
echo " done"
echo -n "setting up encryption ... "
encryptedname=${device//\//_}_encrypted
encryptedname=${encryptedname#_}

Loading…
Cancel
Save