-
Notifications
You must be signed in to change notification settings - Fork 65
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
$action in /etc/netctl/hooks/* #62
Comments
The profile and hooks are sourced at each action. When this happens, you'll find the following environment variables set: INTERFACE, SSID, ACTION. Also, the Profile variable is set. |
I don't agree with you sir. I have executable script /etc/netctl/hooks/test , which IS executed. Content of this file is:
It creates file /tmp/test, but this file only contains for blank lines. Action which executes the hook is:
So this may be a bug? Or am I doing something wrong? |
The variables are only set when the connection actually changes. This means that netctl-auto hands-off the connection to wpa_supplicant, which does its magic (including setting the variables mentioned) whenever the connection changes. Hence the initial starting and stopping are not part of this scheme. You could complement your setup with |
So if I got it right I need to add this two hooks into EVERY profile I have? Don't take me wrong, netctl is pretty good thing, but this is just stupid. |
You could also specify them in a hook file or an interface file, effectively making it the default for every profile or every profile for a specific interface. |
Hey, that's great ^_^ thanks |
Ok, I see there is $action variable in netctl-auto, but it would be nic to have $action variable also in hooks called via
netctl start $profile
I want to enable chrony after connect and disable after disconnet for all profiles, so POST* hook is not very practical for me.
The text was updated successfully, but these errors were encountered: