Skip to content

Send logs from wpa_supplicant action to the journal#194

Open
albertvaka wants to merge 1 commit intojoukewitteveen:masterfrom
albertvaka:albertvaka/journal-wpa-action
Open

Send logs from wpa_supplicant action to the journal#194
albertvaka wants to merge 1 commit intojoukewitteveen:masterfrom
albertvaka:albertvaka/journal-wpa-action

Conversation

@albertvaka
Copy link
Copy Markdown

The logs from the action script passed to wpa_supplicant end in /dev/null by default when wpa_supplicant runs in daemon mode. This redirects them to the journal instead.

@joukewitteveen
Copy link
Copy Markdown
Owner

I see the appeal, but will need some more convincing since I dislike the looks of this change. The identifier is new and does not link back to netctl, and merging stderr and stdout is a bad idea. Maybe we should see whether wpa_supplicant can support yielding its stdout/stderr to the action scripts.

@albertvaka
Copy link
Copy Markdown
Author

I agree this is not great and that it would be better fixed on the wpa_supplicant side, unfortunately I don't have the time to pursue a fix there. I still posted this PR because this is how I found #193 so it has proven quite a useful workaround already, and I also wanted to call your attention onto the problem of the output disappear into the ether. Feel free to close and maybe open an issue instead?

@joukewitteveen
Copy link
Copy Markdown
Owner

If I have time again, I want to investigate whether we can hook up the output to the journal in such a way that it becomes visible in systemctl status netctl-auto@INTERFACE. Perhaps for stderr we could have a separate redirect that somehow makes it clear we are dealing with errors.

@albertvaka
Copy link
Copy Markdown
Author

Splitting the stdout and stderr should be easy:

exec > >(systemd-cat -t wpa_action -p info) \
     2> >(systemd-cat -t wpa_action -p err)

But with this mechanism you can't make it part of the existing systemd unit's logs.

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.

2 participants