24 lines
325 B
Bash
Executable file
24 lines
325 B
Bash
Executable file
#!/bin/bash
|
|
|
|
if [[ -z $OUTPUT_DIR ]] ; then
|
|
source scan-dmidecode
|
|
fi
|
|
|
|
RUNNING=0
|
|
while [[ $RUNNING == 0 ]] ; do
|
|
sleep 1
|
|
if [[ -f /run/badblocks.waiting ]] ; then
|
|
RUNNING=1
|
|
fi
|
|
done
|
|
sleep 5
|
|
tail -Fq $OUTPUT_DIR/disk/*.out &
|
|
|
|
TAIL_PID=`jobs -p %+`
|
|
|
|
while [[ -f /run/badblocks.waiting ]] ; do
|
|
sleep 1
|
|
done
|
|
|
|
kill $TAIL_PID
|
|
|