- echo "SECURE mode (taking /dev/urandom as source, this could take some time)"
- execute "dd if=/dev/urandom of=$TARGET_ bs=1M &>/dev/null" ||\
- die "could not initialise $TARGET_ with /dev/zero"
+ echo "SECURE mode (taking $ENTROPY_SOURCE_ as source, this could take some time)"
+ ddcmd_="dd if=$ENTROPY_SOURCE_ of=$TARGET_ bs=1M &>/dev/null"
+ if [[ -x "$PV_" && $verbose_ -ge 3 ]] ; then
+ ddcmd_="dd if=$ENTROPY_SOURCE_ bs=1M 2>/dev/null | $PV_ | dd of=$TARGET_ bs=1M &>/dev/null"
+ fi
+ execute "$ddcmd_" # ||\
+ # skipped because "no space left on device" from dd
+ # die "could not initialise $TARGET_ with $ENTROPY_SOURCE_"