1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Unmount hard drive after reboot script

Discussion in 'Tomato Firmware' started by macbrian, Mar 16, 2014.

  1. macbrian

    macbrian Networkin' Nut Member

    I want to unmount an USB harddrive after my router has rebooted. I have added

    umount /tmp/mnt/sdd2

    to Administration: Scripts: Init but unfortunately it doesn’t unmount the harddrive.

    If i connect to the router via Telnet the command works perfectly. I am obviously doing something wrong but can anyone guide me to the right way?

    My router is a Asus RT-N66U with Tomato RAF v1.28.9013 1.2v

  2. jerrm

    jerrm Network Guru Member

    The problem is init runs before the drive is mounted. Wait for sysup in init, add the umount to the automount or autorun script, or disable automount.
    darkknight93 and macbrian like this.
  3. macbrian

    macbrian Networkin' Nut Member

    I found and added this to Administration: Scripts: Init:

    while [ $A -gt 0 ] && [ $(cut -f1 -d"." /proc/uptime) -lt 300 ] ; do
    A=$(( $A - 1 ))
    if [ -f /var/notice/sysup ] ; then break; fi
    sleep 1
    umount /tmp/mnt/EFI
    umount /tmp/mnt/sdd2

    Now everything works :)


Share This Page