1) Entware does it.
2) Yes, it's critical, any installed Entware programs would fail. I'm not 100% sure about Diversion, but I think it would fail also.
3) Redone at every boot. The router filesystem, except for /jffs and any mounted USB drives, is stored entirely in memory, so any changes to the filesystem, including the link from /opt, are lost when power is removed. It reloads the filesystem from the firmware into memory at bootup.
Thanks. I have a question/debate to pose which may have been discussed before concerning what would be considered traditional/standardized use of the unix filesystem directory naming structure.
Generally, "/opt" is reserved for optional/3rd party software packages. While Entware of course falls into this category, it is not the sole optional software repository one might install on this device. I feel that claiming the entire "/opt" directory/mount point is a little aggressive.
For instance, if I want to install another application "AppX" to my system, I would generally install this to "/opt/AppX." However this location would now be the link to Entware and "AppX" directory would install alongside the other Entware root directories (e.g. "root", "sbin", "tmp", "etc",...). This would not be ideal.
I could choose to install it to "/opt/opt" which would look a bit better as Entware has no "/opt" within it's structure.
I could choose to put an /opt filestructure at the root of /tmp/mnt/flash_drive and install all my 3rd party products there.
The problem is I can never link this to /opt because Entware has already claimed it.
Ideally, I feel that entware should actually install to "/tmp/mnt/flash_drive/opt" and that /opt should link to this location and all references to Entware should be as "/opt/entware/X".
Or, alternatively, the entire flash drive should just be considered /opt.
I realize that this would likely entail some issues with a new release and upgrades, as well as changes to other scripts.
I don't expect that you will be doing this anytime soon.
However I would like to discuss why this option was chosen and if you believe me to be incorrect in my argument (it's ok to say I'm right and you won't change it...I just need to understand why it was done this way and how you expect/recommend people to deal with this situation).
I'm mostly concerned due to either Entware and or Diversion (or other scripts) wiping out the entire Entware directory on an uninstall which would also remove anything that might be in "/opt" that doesn't directly belong to Entware.
Thoughts?