#!/bin/sh
if test -e /dev/nand0.root.ubi; then
exit 0
fi
# Linux 3.2.x needs VID header offset 2048
ubiattach -d 0 -O 2048 /dev/nand0.root
if [ $? != 0 ]; then
echo "failed to run ubiattach"
exit 1