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

Merge nacli and netctl-auto #49

Merged
merged 6 commits into from
Jul 24, 2013
Merged

Merge nacli and netctl-auto #49

merged 6 commits into from
Jul 24, 2013

Conversation

gandro
Copy link
Contributor

@gandro gandro commented Jul 21, 2013

As requested in gandro/netctl-auto-cli#1, this pull request contains a rewrite of the netctl-auto script, essentially adding a command line interface to control the automatic profile selection. The commands are the same as those of nacli.

In addition to the new commands, I've also documented the start and stop commands in the man page. As stated there, these commands are not supposed to be called by the user, but by systemd through the netctl-auto@.service unit. Nonetheless I've reworked some of naclis code to work even if netctl-auto start was invoked directly. Please let me know if should remove the commands from the documentation.

This function can be used to unquote WPA supplicant config file strings
returned from wpa_cli calls.
This adds a command line interface to the netctl-auto script to
allow users more control over the automatic profile selection.

SEE ALSO
--------
*netctl*(1), *netctl.profile*(5), *netctl.special*(7), *systemctl*(1)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why reference systemctl(1)?

@joukewitteveen
Copy link
Owner

Excellent! Only a few remarks. Contributions such as this one make me happy.


# List of enabled networks
local enabled_networks=$(wpa_call $interface list_networks | tail -n+2 | \
cut -f 1,4 | fgrep -v '[DISABLED]' | cut -f 1 | tr "\n" ' ')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use grep -F instead of fgrep.

@gandro
Copy link
Contributor Author

gandro commented Jul 23, 2013

Sorry for the delay, I'm currently on vacation and don't have easy internet access. But thanks for your feedback, I will fix the patch as soon as possible.

@gandro
Copy link
Contributor Author

gandro commented Jul 23, 2013

I've pushed three commits which should fix the mentioned issues.

@joukewitteveen joukewitteveen merged commit 7d081a2 into joukewitteveen:master Jul 24, 2013
@joukewitteveen
Copy link
Owner

Awesome, thanks!

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.

None yet

2 participants