You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This patch addresses point 2 in #45.
It automatically runs journalctl if the systemctl call fails. It should detect if running in a user terminal or not and skip appropriately. I've done some testing on my system (Arch linux) and it seems to work but more testing is probably good given that netctl is widely used. Diff is against 1.4.-2.
--- /usr/bin/netctl 2014-02-24 11:12:42.021776261 +0100
+++ netctl 2014-02-24 11:12:34.088473909 +0100
@@ -40,6 +40,10 @@
shift
set -- $(sd_escape "$@")
systemctl $command $(printf 'netctl@%s.service\n' "$@")
+ if [ $? -ne 0 ] && [ -t 1 ]; then
+ echo Command failed, last 1 min of log:
+ journalctl -n -o cat -u $(printf 'netctl@%s.service\n' "$@") --since=-1m
+ fi
}
list() {
The text was updated successfully, but these errors were encountered:
This kind of behavior should come from systemctl, not from netctl. If you have problems with the output of systemctl in the case of failing units, complain with systemd.
This patch addresses point 2 in #45.
It automatically runs journalctl if the systemctl call fails. It should detect if running in a user terminal or not and skip appropriately. I've done some testing on my system (Arch linux) and it seems to work but more testing is probably good given that netctl is widely used. Diff is against 1.4.-2.
The text was updated successfully, but these errors were encountered: