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

Give exitcode to systemd service #1600

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

kroese
Copy link
Contributor

@kroese kroese commented Mar 14, 2023

Always when booting my system I get this error in my log:

systemd[1]: umbrel-startup.service: Failed with result 'exit-code'.

I have verified that the start script runs succesfully until the end, and the system is working fine.

So my only guess is that systemd requires you to set the succesful exitcode explicitly, and this patch takes care of that.

@nmfretz
Copy link
Collaborator

nmfretz commented May 27, 2023

Hey @kroese, taking a look at this now. I can't seem to recreate this issue that you encounter. I see the following output after a successful boot:
systemd[1]: Started Umbrel Startup Service.

What are you running Umbrel on?

@kroese
Copy link
Contributor Author

kroese commented May 27, 2023

I'm using Ubuntu 23.04 since recently, but before on Ubuntu 22.10 I had the same issue.

When you don't set an exitcode explicitly at the end of a script, it will use the code from the last executed command, and if that happens to be non-zero the script will also return non-zero. That behaviour is not always wanted.

But to be honest I did not test this patch to see if it fixed the issue, I just theorized what could be happening and wanted to prevent it.

In my log it just says: Failed to start Umbrel Startup Service so it's kind of hard to debug because it does not provide any reason.

Is there any way how I could debug this? I need to get systemd to print the actual exitcode to the log to see where it fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants