#!/bin/sh
if test -e /dev/nand0.rescue.ubi; then
exit 0
fi
ubiattach -d 1 /dev/nand0.rescue
if [ $? != 0 ]; then
echo "failed to run ubiattach for rescue"
exit 1