I'm not using any of that stuff because all we want is the symlink creation.
What means "using"? I think it gets automatically "used" if a upgrade.sh script is existing at the right place on bootup.
When you go for an update, in the SSA, the app knows it has to search for an upgrade.sh in the .ADS. This is an upgrade feature! No need to investigate.
Edit: The .ADS isn't "installed" as you say. The .ADS is decrypted and decompressed into the /upgrade/ dir and then the upgrade.sh is immediately exceuted. It then takes care of the rest.
ok, the .ads is unpacked and upgrade.sh executed, directly and before rebooting. A regular upgrade.sh will then trigger the reboot.
You posted a upgrade.sh from Siglent. It doesn't replace ecomb, but we know that it is replaced somehow. So how does this happen?
I think after the reboot the ecomb program will call check_and_upgrade(). That will then overwrite some stuff, remove upgrade.sh and then do a reboot. That is the second reboot you always experience when doing an update on the SSA. On the next reboot no upgrade.sh is there anymore, so the system boots into the regular program.
But, of course our simplistic script won't work as needed because we are not doing the FS RW. As I said, investigate that part sequence and don't worry with partitions/directories updates/replaces/reformats as we won't be doing any of those.
I think you have to activetly prevent the replacement of this stuff, because if you leave upgrade.sh in place it will automatically take place.
Another idea: can't we just directly start telnetd from upgrade.sh and then remove upgrade.sh? That way don't have to take care of file system modifications and so on.
Do you know if upgrade.sh is called as root or as another user?