#!/bin/bash
cd /opt/home/admin
/etc/storage/cf.sh -n 50 -r -s &
{
while :
do
    sleep 60
    p="$(ps | grep cf.sh | grep -v startcf.sh | grep -v grep)"
    if [ "$p"x = x ] && [ -f tmpip.txt ];then
        mtd_write -r unlock mtd1
    fi
done
}&

