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

Don't write motd message on receiving signal on reboot #83

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

SandakovMM
Copy link
Contributor

No description provided.

@SandakovMM SandakovMM requested a review from ukablan-wpc October 8, 2024 13:11
@SandakovMM SandakovMM self-assigned this Oct 8, 2024
@@ -615,6 +615,12 @@ def main():
log.debug(f"Removed the resume file {options.resume_path!r}")
os.unlink(options.completion_flag_path)

# After lock there's no need to manage signals in such a detailed manner
# Simply log the reason for not rebooting
exit_signal_handler = create_exit_signal_handler(util_name)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need exit_signal_handler creation here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Damn, we don't need it, you right

Comment on lines 621 to 622
for signum in (signal.SIGINT, signal.SIGTERM, signal.SIGHUP, signal.SIGABRT):
signal.signal(signum, lambda signum, frame: log.info(f"Received signal {signum}, going to exit..."))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe you can unify both for signum.. constructs under one def assign_killing_signals..(ff: Callable)

@SandakovMM SandakovMM requested a review from ukablan-wpc October 9, 2024 08:25
@SandakovMM SandakovMM force-pushed the avoid-motd-change-on-reboot branch from 3baa2bc to 0180a21 Compare October 9, 2024 08:41
@SandakovMM SandakovMM merged commit a7f03e4 into main Oct 9, 2024
3 checks passed
@SandakovMM SandakovMM deleted the avoid-motd-change-on-reboot branch October 9, 2024 08:45
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.

2 participants