Conversation
There was a problem hiding this comment.
Pull request overview
This PR improves the Linux agent installer scripts’ handling of systemd-related prerequisites so installations fail with clearer messaging (and don’t abort silently under set -e when systemctl is-system-running returns a non-zero exit code such as degraded).
Changes:
- Make
systemctl is-system-runningnon-fatal underset -eby suppressing stderr and forcing success. - Add explicit prerequisite messaging for service/service-user modes when systemd is not in an acceptable state.
- Add a session-user guard to ensure the systemd user manager is available before proceeding.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| installer/linux/agent-installer.sh | Makes systemd state detection non-fatal and adds a prerequisite message for service installs. |
| installer/linux/agent-installer-session-user.sh | Makes systemd state detection non-fatal and adds a check for a usable systemd user manager in the session-user flow. |
| installer/linux/agent-installer-service-user.sh | Makes systemd state detection non-fatal and adds a prerequisite message for service-user installs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+6
to
7
| systemd_status=$(systemctl is-system-running 2>/dev/null || true) | ||
|
|
Comment on lines
19
to
+20
| echo "Systemd is in unexpected state: $systemd_status. Installation is not supported." | ||
| echo "Prerequisite: an active systemd system manager is required for service mode." >&2 |
Comment on lines
+6
to
7
| systemd_status=$(systemctl is-system-running 2>/dev/null || true) | ||
|
|
|
|
||
| os=$(uname | tr '[:upper:]' '[:lower:]') | ||
| systemd_status=$(systemctl is-system-running) | ||
| systemd_status=$(systemctl is-system-running 2>/dev/null || true) |
Comment on lines
73
to
+74
| echo "Systemd is in unexpected state: $systemd_status. Installation is not supported." | ||
| echo "Prerequisite: an active systemd system manager is required for service-user mode." >&2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
Testing Instructions
Related issues
Checklist