Skip to content

Avoid shell in systemctl helpers#1005

Draft
Asylian21 wants to merge 1 commit into
mynodebtc:masterfrom
Asylian21:codex/safe-systemctl-status
Draft

Avoid shell in systemctl helpers#1005
Asylian21 wants to merge 1 commit into
mynodebtc:masterfrom
Asylian21:codex/safe-systemctl-status

Conversation

@Asylian21
Copy link
Copy Markdown

Summary

  • replace shell-based systemctl status checks with subprocess.run argument lists
  • replace the journalctl | head shell pipeline with direct journalctl -n 300 arguments
  • keep existing status return-code behavior and service enabled cache behavior

Validation

  • git diff --check
  • PYTHONPATH=rootfs/standard/var/pynode python3 -m py_compile rootfs/standard/var/pynode/systemctl_info.py
  • smoke-tested the command builders with mocked subprocess.run and subprocess.check_output

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.

1 participant