I'm trying to add my Script file (Cstats.sh) into Collectd package. Also I want this script file (Cstats.sh) to be run always like other processes in AP. I've added Cstats.sh script file into collectd package and build the source code. After flashing my image into AP, I couldn't see my script file in AP.
Till now, manually added my script file in AP and that is working fine. Now I want to add that Script file into Collectd package. Please support me to add a Script file into my collectd package.
I know that we can add files in root directory e.g. "RootFolder/files/etc/config/collectd.sh" and "RootFolder/files/etc/init.d/collectd". But, I want to add script file into my collectd package itself and also want that to run like other processes, Atleast i need this script file to be placed in some folder.
If you want to change a package Makefile locally, you can branch the git feed (from its directory) and build from source (the image builder uses pre-built packages). You’d probably want to rebase your changes after pulling any upstream package-feed changes.
Thanks Jeff. I understand that it is not possible to change collectd package directly. If i want to do any changes, i have to pull the source code of collectd and add it into my openwrt code. Also I need to change the code to take changes from collectd source instead of pre-build package.
Another thing to try would be not changing the package content in feeds, I'd git-clone/copy collectd sources to package/collectd, then make changes and then build it.
Nice. But, if i do make clean in my source code that won't work again. It is existing code issue/bug in our code . Currently i've copied a new openwrt source code and trying the same method what you said as well as creating script file in root directory.
As you said, I will try to clone collectd sources from github and make the changes then try to build the same. Thanks @stangri I will try and update you soon.
Just a note to be aware of, QSDK, while based on an old version of OpenWrt, is not OpenWrt. Qualcomm/Atheros apparently has modified it significantly from its OpenWrt sources. While some of what would be suggested for OpenWrt seems to work, you may have to adjust based on that build system.
Thanks @stangri@jeff for your valuable time and suggestions. It is working fine for me after changed files in new source code/repository. I mean, I could add script file into collectd package itself under "files" folder and able to view the same in AP device.
I didn't do anything extra other than what we discussed here. I just added my script file in "files" folder of collectd package and done changes in collectd Makefile as stated above.