lime-utils: init the package with the script unique_append - #1276
Conversation
The following changes are made: - initialize the package lime-utils with the script unique_append - add a dependency on lime-utils to all packages - always 'exit 0' on uci defaults that add new crontabs, to execute them only at firstboot and not at every boot Fixes: libremesh#949
2882400 to
d28e343
Compare
This includes also a similar minor fix: - fix: use the lua native #var to count tableLength(var)
d28e343 to
e569bd0
Compare
| else | ||
| return false | ||
| end | ||
| return fs.stat(name, "type") == "reg" |
There was a problem hiding this comment.
I like the new implementation!
But this function passed to be true also for directories to be true only for regular files, and this requires updating this test:
lime-packages/tests/test_test_utils.lua
Line 55 in 1e0e15e
and some (mostly unused) code here (just checked the ones where the variable name looked like a directory's one):
And also here as it seems that keeping directories over updates is supported (according to lime-example.txt, I did not check):
|
I love the new lime-utils package!!! |
|
|
||
| define Package/$(PKG_NAME) | ||
| TITLE:=LibreMesh utils core | ||
| CATEGORY:=LibreMesh |
There was a problem hiding this comment.
Do you think this package could be used out of LibreMesh and be pushed to OpenWrt's repositories, eventually?
In this case, you could already place the package in the Utilities category.
There was a problem hiding this comment.
Yes is seems sensed, ok for the category good catch will do!
Yes the intention is that! I started looking at utils.lua and I'm planning to move the functions like 'set_root_secret' to the module /usr/lib/lua/lime/system.lua and to port to the new lime-utils 'utils.lua' and 'config.lua' I initially tought that modules could remain in lime-system, maybe also they should have their own directory which could be /usr/lib/lua/lime/modules and the list of modules is a list of files contained in that folder, to ease the possibility to add new modules what do you think? |
Great!!!
Wow, so that utils.lua would be free of LibreMesh-specific functions? It would be amazing, but also a lot of work for moving many functions (I did not check them one by one, but I suspect they are many)!
You are right, it is better. Now that I check this again, also
Nice! It would be more tidy :) |
[WIP] still untested
lime-system: utils.lua use nixio.fs for file operations
This includes also a similar minor fix:
lime-utils: init the package with the script unique_append
The following changes are made:
only at firstboot and not at every boot
Fixes: #949