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

Bond: set mode #96

Closed
jsebosik opened this issue Aug 19, 2014 · 3 comments
Closed

Bond: set mode #96

jsebosik opened this issue Aug 19, 2014 · 3 comments

Comments

@jsebosik
Copy link

Hi,

I`ve made a tiny patch to netctl/src/lib/connections/bond, which allows user to configure bonding mode:

if is_interface "$Interface"; then
report_error "Interface '$Interface' already exists"
return 1
else
interface_add bond "$Interface"
fi

+if [[ ! -z "$Mode" ]]; then
+echo $Mode > /sys/class/net/${Interface}/bonding/mode
+fi

bring_interface_up "$Interface"

Mode can be set according to kernel documentation:
https://www.kernel.org/doc/Documentation/networking/bonding.txt

@joukewitteveen
Copy link
Owner

Why not modify the interface_add line into

interface_add bond "$Interface" "" mode "$Mode"

Anyway, the parameter also needs to be documented in netctl.profile(5)

@jsebosik
Copy link
Author

Yeah this is smarter solution.. thanks for pointing out right direction.
Now it`s time to prepare patches :).

@joukewitteveen
Copy link
Owner

Implemented in d2cf9ae

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

No branches or pull requests

2 participants