Remove init symlink softethervpn (and other) before build firmware

Howto remove symlink softethervpn (in /etc/rc.d/) berfore build firmware (not init script in /etc/init.d/)
/etc/rc.d/S60softethervpnbridge -> ../init.d/softethervpnbridge
/etc/rc.d/S60softethervpnclient -> ../init.d/softethervpnclient
/etc/rc.d/S60softethervpnserver -> ../init.d/softethervpnserver
(and more other my service)

https://lede-project.org/docs/user-guide/imagebuilder#remove_useless_files_from_firmware
Only for Image Builder

You can't.
Symlink are created for all packages that are installed to the firmware and have init scripts.

But you can use uci-defaults scripts to remove the symlink at the first boot after flash.
See old discussion and example in https://forum.openwrt.org/viewtopic.php?pid=126668#p126668

cat /etc/uci-defaults/softethervpn

#!/bin/sh

/etc/init.d/softethervpnbridge enabled && {
    /etc/init.d/softethervpnbridge stop
    /etc/init.d/softethervpnbridge disable
}

/etc/init.d/softethervpnserver enabled && {
    /etc/init.d/softethervpnserver stop
    /etc/init.d/softethervpnserver disable
}

/etc/init.d/softethervpnclient enabled && {
    /etc/init.d/softethervpnclient stop
    /etc/init.d/softethervpnclient disable
}

rm -f /tmp/luci-indexcache
exit 0 

Thanks

Note that you do not need to do anything for the luci-indexcache if softethernvpn has no luci components.
(in the example linked by me, miniupnpd had luci interface, so that line had relevance)

cat /etc/uci-defaults/softethervpn

#!/bin/sh

/etc/init.d/softethervpnbridge enabled && {
    /etc/init.d/softethervpnbridge stop
    /etc/init.d/softethervpnbridge disable
}

/etc/init.d/softethervpnserver enabled && {
    /etc/init.d/softethervpnserver stop
    /etc/init.d/softethervpnserver disable
}

/etc/init.d/softethervpnclient enabled && {
    /etc/init.d/softethervpnclient stop
    /etc/init.d/softethervpnclient disable
}

exit 0 

Ok, i understand