Open ilario opened 1 year ago
Currently three solutions have been proposed:
I proposed to just edit all the files: https://github.com/libremesh/lime-packages/pull/980/commits/ff8fd58d45c0b3fcb7119b2eceaad256446e41d5
@aparcar proposed to create a function to be used until when unique_append gets included in OpenWrt's built-in list of functions (but we did not propose that to OpenWrt yet): https://github.com/libremesh/lime-packages/pull/988
@G10h4ck proposed to create an executable file and put it in the path, like here: https://github.com/libremesh/lime-packages/tree/master/packages/lime-system/files/usr/bin
I like the second option as we should always try to push useful code to OpenWrt. Or we just create the executable file (third option) and some day we will push the function to OpenWrt...
The onliner function used often in the code for adding a line to the root crontab does not check for its existence before looking into it with grep. For example here:
https://github.com/libremesh/lime-packages/blob/5398a91f50abeb5988c56de41aec7bf20da361f8/packages/shared-state/files/etc/uci-defaults/shared-state-publishers-cron#L3-L10
This causes an error on the very first execution of such function:
Nevertheless, the content gets added to the crontab anyway, so everything should work even when this error message appears.