Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] How to make changes via ethtool persistent
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
zirtik
n00b
n00b


Joined: 15 Apr 2011
Posts: 13

PostPosted: Fri Apr 13, 2012 10:14 pm    Post subject: [SOLVED] How to make changes via ethtool persistent Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46341
Location: 56N 3W

PostPosted: Fri Apr 13, 2012 10:48 pm    Post subject: Reply with quote

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
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1600
Location: US

PostPosted: Sat Apr 14, 2012 1:47 pm    Post subject: Reply with quote

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 :)
Back to top
View user's profile Send private message
zirtik
n00b
n00b


Joined: 15 Apr 2011
Posts: 13

PostPosted: Mon Apr 16, 2012 9:35 pm    Post subject: Reply with quote

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
View user's profile Send private message
zirtik
n00b
n00b


Joined: 15 Apr 2011
Posts: 13

PostPosted: Mon Apr 16, 2012 9:36 pm    Post subject: Reply with quote

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 :)


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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46341
Location: 56N 3W

PostPosted: Mon Apr 16, 2012 9:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1600
Location: US

PostPosted: Mon Apr 16, 2012 10:03 pm    Post subject: Reply with quote

zirtik,

If you scripted in /etc/local.d/ then that's all you need :wink:

Quote:
It seems to work now

and there's no substitute for something that works :)
_________________
Good luck :wink:

Since installing gentoo, my life has become one long emerge :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum