Debian Codegraph @

src/test/entropy.config

raw
1 #!/bin/sh
2
3 randfifo=/tmp/random.fifo
4
5 empty_fifo() {
6 while [ ! -p $randfifo ]; do
7 sleep 1
8 done
9 cat $randfifo >/dev/null
10 }
11
12 . ../client/confmodule
13
14 db_capb backup
15 echo "capb: $RET"
16 if ! echo "$RET" | grep -w plugin-entropy; then
17 echo "entropy plugin not available"
18 exit 1
19 fi
20
21 empty_fifo & PID=$!
22
23 db_subst test/entropy DEVICE /dev/sda1
24 db_subst test/entropy FIFO $randfifo
25 db_subst test/entropy SUCCESS test/success
26 db_subst test/entropy KEYSIZE 128
27 db_fset test/entropy seen false
28 db_input high test/entropy
29 db_go
30
31 echo "$RET"
32
33 kill $PID
34 rm -f $randfifo