Skip to content
Snippets Groups Projects
Commit b34f51a1 authored by Семён Марьясин's avatar Семён Марьясин Committed by Jouke Witteveen
Browse files

Speed up 'netctl list'

When you call `netctl list`, it calls `systemctl status` for each of the
profiles. By default, `systemctl status` fetches the last log entries from the
journal, which is often a time-consuming operation. Additionally, the status
output is not meant for machine processing.
parent e8109311
No related branches found
No related tags found
No related merge requests found
......@@ -144,7 +144,7 @@ sd_call() {
## Retrieves the status string from the unit for a profile
# $1: profile name
sd_status_text() {
sd_call status "$1" | sed -n 's/^ *Status: "\(.*\)"$/\1/p'
sd_call "show --property=StatusText --value" "$1"
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment