# Automatically enabling/disabling wireless?

## pinger

Hi all

This is probably a naive question  :Embarassed:  but here goes :

Would there be a way for my wireless to go down whenever the wired connection is plugged? Or in other words, would it be possible that when a network cable is plugged into my ethernet card the following gets done:

```

/etc/init.d/net.eth0 restart && /etc/init.d/net.eth1 stop

```

and when said network cable is unplugged:

```

/etc/init.d/net.eth0 stop && /etc/init.d/net.eth1 start

```

Thanks in advance for your help

----------

## zarnce

The answer is yes.  I started working on doing this myself.  There is a program called ifplugd that monitors network devices and will run a script when they change.  Its in portage so you can just emerge ifplugd.  I haven't had time to get it fully working or I would show you my scripts.

Hope that helps

  Zarnce

----------

## pinger

Thanks a bunch, I will look into it!

----------

