-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No value in $RANDOM #800
Comments
I checked this point and it seems that this bug is closed in SNAPSHOT and the actual branch 21.02. |
Thanks for checking! |
Question: can we include this in the current version 19.07.7 or do we have to wait until version 21.02? |
Eh? |
@rallep71 : This bug was only in master, please check my mail on the mailinglist - there is/was no problem in 19.07.x ;-) |
Logfile, 19.07.7 |
@rallep71 that log is normal (no error). The variables are replaced on execution, but they are loged "as they are" in the cron config. |
Thank you for the clarification!!! Mercy |
Thank you and @AndyMcSchopf for the feedback and being alert of posible problems! |
On the Matrix/Element chat, Pony wrote that the $RANDOM is empty, again. This seems related to the lack of effect of the This is not the only variable that can be not present when alternative installation methods are used (e.g. ImageBuilder SDK or installing packages one by one via OPKG), more of these configuration options have been listed here: |
In my opinion we should stop using $RANDOM and use either math.random from Lua where possible (some care has to be employed for this to work, see https://stackoverflow.com/questions/21806967/lua-math-random) or some handmade pseudorandom number generator. Actually, we already have a pseudorandom generator that can be instructed to output numeric strings: lime-packages/packages/lime-system/files/usr/lib/lua/lime/utils.lua Lines 363 to 365 in 8b54080
But the $RANDOM variable gets used in shell scripts, so it would be more convenient to avoid calling Lua things. We could use this: https://stackoverflow.com/a/4508380 |
Turns out that |
Thanks @pony1k ! |
This has been addressed in #980, check it out |
Just proposed a package with an alternative command that can be used here: |
$RANDOM has been activated in OpenWrt with openwrt/openwrt#12465 and openwrt/openwrt@8f427f1, should be available in the next 23.something release. |
As stated here: lime-users-maillinglist
I found out, that in OpenWRT snapshot there is no value initialized for the Variable $RANDOM which is used in crontab for LiMe.
The text was updated successfully, but these errors were encountered: