Skip to content
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

if off-line the setup-dependencies.sh prevents rc.local to complete ansd create symlink to /service/dbus-mqtt-devices #132

Open
kds69 opened this issue Nov 3, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@kds69
Copy link

kds69 commented Nov 3, 2024

Version

0.8.0 (current)

VenusOS version

3.50

Does this issue occur during installation or at runtime ?

Runtime

Is there a Discussion thread for this issue? Please paste a link.

No response

What is the issue you are actually experiencing?

It seems drivers failed to work if GX is offline.
Most likely the symlink to latest drivers is not created (rc.local timeout?)
Tested by forcing in the command line the symlink creation after reboot:
ln -s /data/drivers/dbus-mqtt-devices-0.8.0/bin/service /service/dbus-mqtt-devices

Maybe 10 attempts every minute is too much? this is 10mn...
May I suggest to either reduce the number of attempts and time between attempts or add a "&" to let the symlink be created anyway. I believe this is harmless...

If this is not installation related, what does the status payload look like that you are publishing to the driver to register your device?

No response

Relevant log output

No response

@freakent
Copy link
Owner

freakent commented Nov 3, 2024

Ah I see, that is a bug. Well spotted.

@freakent
Copy link
Owner

freakent commented Nov 3, 2024

The setup script does a lot more than just create the symlink. It also installs the dependencies from the internet. If you don't have an internet connection it won't install. I remember thinking that retrying every 10 seconds was a bit brutal but it's such an edge case it's not worth over complicating it any more than that.

@kds69
Copy link
Author

kds69 commented Nov 3, 2024

sorry I didn't mentioned in the issue detail, only in the title: I am not speaking about the set-up script, speaking about the setup-dependencies.sh, which runs at every reboot/start-up.
+I figured out it is in reality a endless loop due to a missing "t" in "atempts"...:

attempts=$((atempts + 1))

to be replaced with

attempts=$((attempts + 1))

Anyway, IMHO a 10mn time-out is far too much, something like 6 attempts every 10s is sufficient and it is already a lot.

@freakent freakent added the bug Something isn't working label Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants