What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Setting up Entware on asuswrt

Since the root is read-only /opt is already symlinked to /tmp/opt (at least on my RT-AC66U)

So, what you need to do is symlink /mnt/sda1/asusware to /tmp/opt.

I do it in the /jffs/scripts/post-mount script. This will create the symlink if it does not exist and it will lanch the upstart scripts if the mounted device is the optware device. (Note: I have labeled the partition "optware".)

#!/bin/sh
[ ! -e /tmp/opt ] && [ -e /mnt/optware ] && ln -s /mnt/optware /tmp/opt
sleep 2s
[ "$1" = "/tmp/mnt/optware" ] && /opt/etc/init.d/rc.unslung start
 
Thanks Nerre, with this script it worked

#!/bin/sh
[ ! -e /tmp/opt ] && [ -e /mnt/sda1/asusware ] && ln -s /mnt/sda1/asusware /tmp/opt
sleep 2s
[ "$1" = "/tmp/mnt/sda1/asusware" ] && /opt/etc/init.d/rc.unslung start
 
Last edited:
The 2s sleep was put there because it seems as if symlinks took some time to be created. Not sure if that part could be improved. For me it just runs when I reboot the router so no big problem. I have a 5 s sleep in another script for similar purposes.
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top