OpenWrt Forum Archive

Topic: Automatic unmounting of mmc upon reboot?

The content of this topic has been archived on 29 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I have an init-script that automatically mounts my mmc card when the router is turned on, but is there some way of also automatically unmounting the card when typing reboot or rebooting through X-wrt?

Edit the reboot script?

in /etc/inittab, include a line like

::shutdown:/bin/umount -a

mikes wrote:

in /etc/inittab, include a line like

::shutdown:/bin/umount -a

Thanks a lot, exactly what I needed!

va1210 wrote:
mikes wrote:

in /etc/inittab, include a line like

::shutdown:/bin/umount -a

Thanks a lot, exactly what I needed!

you should do it like this:

::shutdown:/bin/umount -a -r

this remounts the device as read-only if mount is busy.

The discussion might have continued from here.