#!/bin/sh
. /etc/utils/shell-utils.sh

start_eth0()
{
    ifup eth0
}

if [ "$1" == "active" ]; then
    echo 0 > /sys/class/leds/red/level_off
    /etc/init.d/S10led active
else
    #for i in /dev/sd[a-f] ; do blkid -c /ram/blkid.tab $i; done
    rm /ram/ntpdate.started
    killall ntp.sh

    get_sdio_wifi MODULE

    /etc/init.d/wifi_init.sh

    if [ "${MODULE}" == "rtk" ]; then
        dev=`rfkill | grep hci0 | awk '{print $1}'`
        rfkill block $dev
        rfkill unblock $dev
    fi

    isNfsMount NFS_MOUNT
    if [ "${NFS_MOUNT}" == "n" ]; then
        start_eth0 &
    fi

    kill -s SIGVTALRM `cat /var/run/login.pid`
fi

