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

comment out non-code in MOTD output #6

Open
rbucker opened this issue May 20, 2020 · 0 comments
Open

comment out non-code in MOTD output #6

rbucker opened this issue May 20, 2020 · 0 comments

Comments

@rbucker
Copy link

rbucker commented May 20, 2020

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.

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

No branches or pull requests

1 participant