# [SOLVED] How to make changes via ethtool persistent

## zirtik

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

```
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

----------

## NeddySeagoon

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.

----------

## BillWho

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. 

```
postup() {

   local unset_functions=false

   return 0

}

```

 should do it   :Smile: 

----------

## zirtik

 *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.
> ...

 

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

----------

## zirtik

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. 
> 
> ```
> ...

 

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.

----------

## NeddySeagoon

zirtik,

I suggested both - both work.

Gentoo is about choice - its over to you.

----------

## BillWho

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

----------

