Posted: Sun Jul 15, 2012 14:19 Post subject: Howto umount USB and shutdown the router properly?
Hi all,
I' looking for a way to shutdown properly my wrt160nl with dd-wrt firmware V24-sp2 (not just a reboot)
I got a USB storage on it, that must be correctly unmouted before the shutdown (when I do a umount /dev/sda1 from SSH connection, I get a busy device... (cause some folders (/mnt, /root/tmp) are binded with rom folders (optware enabled))
... and I don't know how to unbind (umount -o ??) those mounts.
A lazy umount seems to be possible, but I think that's not a perfect way.
That's important for me to find an issue because I have already broken several USB dongles.
Please help, do you have a working script to do that? runnable into a cron job maybe?...
I could anderstand that's not possible to shutdown completely the device (hardware cause)...
But, it's still necessary to umount properly the USB before unplug the router.
Cause of optware, there is different mount in the startup script;
mount -o bind /mnt/etc /etc
mount -o bind /mnt/root /tmp/root
mount -o bind /mnt/opt /opt
Those mounts are difficult,for me, to undo.
There is any usefull linux command to kill each process attached to /dev/sda1 for example?
Thanks for the idea, but that's not working.
The device stay mounted after disabling USB core and applying changes, became effective only after reboot.
I'm not far from the solution but there is something strange in the dd-wrt structure
I kill all processes from a cron job, and also try to unmount USB dongle, but the mount is busy with something into /tmp/root... when I "ps | grep /tmp/root" I get only the current grep process, nothing else.