Skip to content
This repository was archived by the owner on Aug 7, 2025. It is now read-only.
This repository was archived by the owner on Aug 7, 2025. It is now read-only.

comment out non-code in MOTD output #6

@rbucker

Description

@rbucker

here is the output my system just generated

$ sudo clr-service-restart -a -n
NetworkManager.service: needs a restart (a library dependency was updated)
/usr/bin/systemctl --no-ask-password try-restart NetworkManager.service
systemd-machined.service: needs a restart (a library dependency was updated)
/usr/bin/systemctl --no-ask-password try-restart systemd-machined.service
dbus.service: needs a restart (a library dependency was updated)
/usr/bin/systemctl --no-ask-password try-restart dbus.service
systemd-logind.service: needs a restart (a library dependency was updated)
/usr/bin/systemctl --no-ask-password try-restart systemd-logind.service

The challenge with this is [a] I need to reboot to restart the services... or [b] I need to copy/paste them individually. But if the output looked like:

#  NetworkManager.service: needs a restart (a library dependency was updated)
/usr/bin/systemctl --no-ask-password try-restart NetworkManager.service
#  systemd-machined.service: needs a restart (a library dependency was updated)
/usr/bin/systemctl --no-ask-password try-restart systemd-machined.service
#  dbus.service: needs a restart (a library dependency was updated)
/usr/bin/systemctl --no-ask-password try-restart dbus.service
#  systemd-logind.service: needs a restart (a library dependency was updated)
/usr/bin/systemctl --no-ask-password try-restart systemd-logind.service

Then I can copy/paste the entire block. easy peasy.... and add the sudo to the command sample.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions