diff --git a/scripts/wrapper-badblocks b/scripts/wrapper-badblocks index 507aa3c..e713dc9 100755 --- a/scripts/wrapper-badblocks +++ b/scripts/wrapper-badblocks @@ -139,10 +139,25 @@ if [[ -f $OUTPUT_DIR/disk/$SERIAL.badblocks ]] ; then ln -sf $OUTPUT_DIR/disk/$SERIAL.badblocks \ $OUTPUT_DIR/disk/$DISK.badblocks fi -#if [[ -f $OUTPUT_DIR/disk/$SERIAL.badblocks.out ]] ; then -# ln -sf $OUTPUT_DIR/disk/$SERIAL.badblocks.out \ -# $OUTPUT_DIR/disk/$DISK.badblocks.out -#fi +if [[ -f /run/$SERIAL.badblocks.out ]] ; then +# strings /run/$SERIAL.badblocks.out \ +# | sed 's/\s\+[0-9.%]\+ done, [0-9:]\+ elapsed.//' \ +# | uniq > $OUTPUT_DIR/disk/$SERIAL.badblocks.out + date > $OUTPUT_DIR/disk/$SERIAL.badblocks.out + strings /run/$SERIAL.badblocks.out \ + | grep -B5 -A5 Testing \ + >> $OUTPUT_DIR/disk/$SERIAL.badblocks.out + echo "..." >> $OUTPUT_DIR/disk/$SERIAL.badblocks.out + strings /run/$SERIAL.badblocks.out \ + | grep -B5 -A5 Reading \ + >> $OUTPUT_DIR/disk/$SERIAL.badblocks.out + echo "..." >> $OUTPUT_DIR/disk/$SERIAL.badblocks.out + strings /run/$SERIAL.badblocks.out \ + | grep -B5 -A5 completed \ + >> $OUTPUT_DIR/disk/$SERIAL.badblocks.out + ln -sf $OUTPUT_DIR/disk/$SERIAL.badblocks.out \ + $OUTPUT_DIR/disk/$DISK.badblocks.out +fi #ln -sf $OUTPUT_DIR/disk/$SERIAL.badblocks.ret \ # $OUTPUT_DIR/disk/$DISK.badblocks.ret ln -sf $OUTPUT_DIR/disk/$SERIAL.badblocks.result \