# how-to make ifplugd "beep" when I plug a cable

## Coume

Hello,

when I was using ifplugd under FC1 and FC2, whenever I was plugging a network cable and a network connexion was going up or down, I had a Beep through the PC speaker of the laptop.

It was very convenient to know when the connexion was going up or down, anyone managed to get ifplugd beeping under Gentoo???

Thxs in advance!

Ludo

----------

## InfinityX

You just need to edit /usr/sbin/ifplugd.action, like so:

```
case "$2" in

    up)

        state=start

        command

        ;;

    down)

        state=stop

        command

        ;;
```

You'll need the pcspeaker module loaded for the console beep to work though.

Edit: sorry that's pcspkr module, it's in device drivers > input devices > misc in the 2.6 kernel. Once that's in just put the beep command in.

----------

## Coume

Wooooohhhhhhhhhhoooooooooooooooooooo  :Smile: 

It works  :Smile: 

I had to recompile kernel and it is now beeping when I plug or unplug the cable.

In fact it beeps twice when I plug the cable... but I'd rather have it beeping twice that not a single time!

So thanks you very much for this quick answer  :Very Happy: 

Ludo

----------

