I am migrating a platform from openwrt18 to openwrt19.
I saw a difference between the two platforms, in some /etc/init.d/MyServiceXXX, if having START= and STOP= this automatically get symlinks created in /etc/rc.d in openwrt19 but not openwrt18.
Also, if i delete these rc.d/symlinks in the target, they don't comeback.
Some obscure documentation found here say it is done at compilation time,
i would like to prevent this, but I want to keep START= and STOP= because i need them when i manually enable my service in some extra logic.
I tried to add AUTOENABLE=no just after START= and this works, but it works so well that when i furthur want to enable myService manually, symlink for start don't get created (only the Kxx).
Neither. Their behavior is correct when i do
myService enable -> Link are created in rc.d
myService disable -> Link are removed from rc.d
My concern is that on the first boot after flashing the board, they were automatically getting created eventhough i never called 'enable' - this behavior is new in openwrt19 and was not there in openwrt18 as far as i can see.
Now i'm working on adding 'AUTOENABLE=no" in the init scripts, the first time i tried it, it did not make any difference, but now it is working (rc.d symlinks not created on first boot),
i'm still trying to figure out why sometimes it works and sometimes it doesn't.
I finally found out that the only way to have packages installed in openwrt but not automatically symlinked, is to install them in a custom location (at build time) then move them to desired location on your first boot. In my case that was done in rc.local, there is a 'mv' done of the package on the first boot only. That prevent the build system of scanning it and create symlinks in rc.d as described here:
Would be nice that openwrt provide an option to skip symlinks at build time on the packages we don't want to enable out from the box...
If whatever you're doing, uses some kind of conf file, you could simply add an enable switch in the conf.
Even if the script fires, nothing will happen as long as enables stays != 1.