Results 1 to 2 of 2

Thread: shutdown script

  1. #1

    shutdown script

    What script executed when i run
    shutdown ?
    i have latest kfurge *.nas firmware.
    WL-700GE,rtorrent,amule, mldonkey, ïðîøèâêà kfurge
    ÂÑÅ íà âûáîðû !
    Äëÿ íîâè÷êîâ è ëåíèâûõ

  2. #2
    Quote Originally Posted by sonic View Post
    What script executed when i run
    shutdown ?
    i have latest kfurge *.nas firmware.
    Hitting the power button executes /sbin/miscio_input_change. I'm not sure if executing the "shutdown" command does too. In my latest builds, I've replaced Asus symlink with a script that hooks in rc.local (i.e. it runs "rc.local stop") at shutdown.

    Here's my script:

    #!/opt/bin/bash
    #
    # Copyright 2008, KFURGE
    # All Rights Reserved.
    #
    # THIS SOFTWARE IS OFFERED "AS IS", AND KFURGE GRANTS NO WARRANTIES OF ANY
    # KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. KFURGE
    # SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
    # FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
    #

    export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/opt/bin:/opt/sbin

    POWER=`cat /proc/miscio/soft_power_switch`
    GPIO6=`cat /proc/miscio/gpio_6`

    if [ "$GPIO6" = "1" ]; then
    if [ -e /opt/etc/rc.local ]; then
    /opt/etc/rc.local copy
    fi
    echo "0" > /proc/miscio/gpio_6
    fi

    if [ "$POWER" = "1" ]; then
    if [ -e /opt/etc/rc.local ]; then
    /opt/etc/rc.local stop
    fi
    rm -f /tmp/miscio_input_change
    ln -s /sbin/rc /tmp/miscio_input_change
    /tmp/miscio_input_change &
    fi

    exit 0


    - K.C.

Similar Threads

  1. Update NoIp, DynDNS, dyn.ee, ipactive via script
    By rj.2001 in forum WL-500g/WL-500gx Tutorials
    Replies: 9
    Last Post: 04-01-2011, 15:48
  2. BusyBox cgi Script Fehlerbehandlung
    By WLAN-Fan in forum German Discussion - Deutsch (DE)
    Replies: 0
    Last Post: 03-06-2008, 16:11
  3. Script for asus router
    By and_woox in forum WL-500gP Q&A
    Replies: 1
    Last Post: 12-11-2007, 03:53
  4. Call script from post-boot and not returing?
    By scriptman in forum WL-500gP Q&A
    Replies: 2
    Last Post: 04-12-2006, 03:56

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •