-
Notifications
You must be signed in to change notification settings - Fork 17
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
Bugfix/issue 548 #667
Merged
Merged
Bugfix/issue 548 #667
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,7 +44,6 @@ if [ "$1" = "configure" ]; then | |
override_dir="@SYSTEMD_UNIT_DIR@/@[email protected]" | ||
mkdir -p "${override_dir}/" | ||
( echo '[Service]'; echo "User=root" ) > "${override_dir}/10-run-as-root.conf" | ||
# todo ok to `systemctl daemon-reload` here? | ||
fi | ||
fi | ||
|
||
|
@@ -54,19 +53,31 @@ fi | |
|
||
# Copied from https://github.com/Debian/debhelper/blob/master/autoscripts/postinst-systemd-dont-enable | ||
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then | ||
if deb-systemd-helper debian-installed @SYSTEMD_UNIT_FILE_NAME@; then | ||
# This will only remove masks created by d-s-h on package removal. | ||
deb-systemd-helper unmask @SYSTEMD_UNIT_FILE_NAME@ >/dev/null || true | ||
if deb-systemd-helper debian-installed @SYSTEMD_UNIT_FILE_NAME@; then | ||
# This will only remove masks created by d-s-h on package removal. | ||
deb-systemd-helper unmask @SYSTEMD_UNIT_FILE_NAME@ >/dev/null || true | ||
|
||
if deb-systemd-helper --quiet was-enabled @SYSTEMD_UNIT_FILE_NAME@; then | ||
# Create new symlinks, if any. | ||
deb-systemd-helper enable @SYSTEMD_UNIT_FILE_NAME@ >/dev/null || true | ||
fi | ||
fi | ||
if deb-systemd-helper --quiet was-enabled @SYSTEMD_UNIT_FILE_NAME@; then | ||
# Create new symlinks, if any. | ||
deb-systemd-helper enable @SYSTEMD_UNIT_FILE_NAME@ >/dev/null || true | ||
fi | ||
fi | ||
|
||
# Update the statefile to add new symlinks (if any), which need to be cleaned | ||
# up on purge. Also remove old symlinks. | ||
deb-systemd-helper update-state @SYSTEMD_UNIT_FILE_NAME@ >/dev/null || true | ||
fi | ||
# End copied section | ||
|
||
# Update the statefile to add new symlinks (if any), which need to be cleaned | ||
# up on purge. Also remove old symlinks. | ||
deb-systemd-helper update-state @SYSTEMD_UNIT_FILE_NAME@ >/dev/null || true | ||
# Copied from https://github.com/Debian/debhelper/blob/master/autoscripts/postinst-systemd-restartnostart | ||
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then | ||
if [ -d /run/systemd/system ]; then | ||
systemctl --system daemon-reload >/dev/null || true | ||
# TODO: Handle service restart | ||
# if [ -n "$2" ]; then | ||
# deb-systemd-invoke try-restart @SYSTEMD_UNIT_FILE_NAME@ >/dev/null || true | ||
# fi | ||
fi | ||
fi | ||
# End copied section | ||
Comment on lines
+72
to
82
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the only real change. The rest was normalizing tabs to spaces for copied sections to avoid weird visual artifacts in spacing. |
||
|
||
|
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Coped from https://github.com/Debian/debhelper/blob/master/autoscripts/prerm-systemd | ||
if [ -d /run/systemd/system ] && [ "$1" = "remove" ]; then | ||
deb-systemd-invoke stop @SYSTEMD_UNIT_FILE_NAME@ >/dev/null || true | ||
deb-systemd-invoke stop @SYSTEMD_UNIT_FILE_NAME@ >/dev/null || true | ||
fi | ||
# End copied section |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the story behind this todo comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's the default behavior for this shard of debhelper code, so commented out for now. Per previous discussions, service restart should be handled via some other mechanism, like debconf in the future. OpenZiti might transport config management tooling, and automatic restarts can potentially break transport during a config management operation.