View previous topic :: View next topic |
Author |
Message |
zirtik n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 15 Apr 2011 Posts: 13
|
Posted: Fri Apr 13, 2012 10:14 pm Post subject: [SOLVED] How to make changes via ethtool persistent |
|
|
I have made some changes on my NIC using ethtool and found out they are nor persistent. After each reboot, I have to issue the same ethtool command manually. While searching the forums, I found this topic
https://forums.gentoo.org/viewtopic-t-482890-view-previous.html?sid=e9aec1dda5d94a817015e87085f0f7e6
it suggests modifying /conf/init.d/net.ethX file as
Code: | local unset_functions=false |
However, I couldn't find any such line in /conf/init.d/net.eth0. II tried adding that line at the very end of the file, and it didn't work.
Is there a workaround to make changes to the NIC via ethtool persistent?
Thanks.
Last edited by zirtik on Mon Apr 16, 2012 9:32 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
NeddySeagoon Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/3946266373f47d606a2db3.jpg)
Joined: 05 Jul 2003 Posts: 54850 Location: 56N 3W
|
Posted: Fri Apr 13, 2012 10:48 pm Post subject: |
|
|
zirtik,
Make a file in /etc/local.d/ called, say, ethtool.start
In this file put the commands as you would type them at the keyboard.
Be sure to read the README file there.
Your /etc/conf.d/net file supports pre and post up functions and pre and post down funtions.
postup sounds promising, Read /usr/share/doc/openrc... to see how to use those functions. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
BillWho Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/11944701294f68e0ba14919.gif)
Joined: 03 Mar 2012 Posts: 1600 Location: US
|
Posted: Sat Apr 14, 2012 1:47 pm Post subject: |
|
|
zirtik,
Take a look at /usr/share/doc/openrc-0.9.9.3/net.example.bz2 postup() function as NeddySeagoon mentioned. I use the preup() function to manipulate the wired and wireless interfaces.
Code: | postup() {
local unset_functions=false
return 0
}
| should do it ![Smile :)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
zirtik n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 15 Apr 2011 Posts: 13
|
Posted: Mon Apr 16, 2012 9:35 pm Post subject: |
|
|
NeddySeagoon wrote: | zirtik,
Make a file in /etc/local.d/ called, say, ethtool.start
In this file put the commands as you would type them at the keyboard.
Be sure to read the README file there.
Your /etc/conf.d/net file supports pre and post up functions and pre and post down funtions.
postup sounds promising, Read /usr/share/doc/openrc... to see how to use those functions. |
Thank you. I created ethtool.start and added all ethtool commands as you suggested, made the file executable and rebooted. It worked!
Last edited by zirtik on Mon Apr 16, 2012 9:37 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
zirtik n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 15 Apr 2011 Posts: 13
|
Posted: Mon Apr 16, 2012 9:36 pm Post subject: |
|
|
BillWho,
BillWho wrote: | zirtik,
Take a look at /usr/share/doc/openrc-0.9.9.3/net.example.bz2 postup() function as NeddySeagoon mentioned. I use the preup() function to manipulate the wired and wireless interfaces.
Code: | postup() {
local unset_functions=false
return 0
}
| should do it ![Smile :)](images/smiles/icon_smile.gif) |
Did you suggest this as an alternative solution to what NeddySeagoon said? Should I still modify the postup() function or leave it as is? It seems to work now, without postup() being modified. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
NeddySeagoon Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/3946266373f47d606a2db3.jpg)
Joined: 05 Jul 2003 Posts: 54850 Location: 56N 3W
|
Posted: Mon Apr 16, 2012 9:45 pm Post subject: |
|
|
zirtik,
I suggested both - both work.
Gentoo is about choice - its over to you. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
BillWho Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/11944701294f68e0ba14919.gif)
Joined: 03 Mar 2012 Posts: 1600 Location: US
|
Posted: Mon Apr 16, 2012 10:03 pm Post subject: |
|
|
zirtik,
If you scripted in /etc/local.d/ then that's all you need
Quote: | It seems to work now |
and there's no substitute for something that works ![Smile :)](images/smiles/icon_smile.gif) _________________ Good luck
Since installing gentoo, my life has become one long emerge ![Smile :)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|