Bug 73115 - Have mii-tool call a script on status changes
Summary: Have mii-tool call a script on status changes
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: net-tools
Version: 7.3
Hardware: i386
OS: Linux
low
medium
Target Milestone: ---
Assignee: Phil Knirsch
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-08-30 21:42 UTC by Jason Tibbitts
Modified: 2015-03-05 01:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-08-30 21:42:53 UTC
Embargoed:


Attachments (Terms of Use)
Patch to mii-tool (2.56 KB, patch)
2002-08-30 21:42 UTC, Jason Tibbitts
no flags Details | Diff

Description Jason Tibbitts 2002-08-30 21:42:02 UTC
mii-tool has the capability to watch a network interface for status changes.  It
is a simple enhancement to make it do something useful when it detects a status
change.  I will attach a short patch which adds a --script option; mii-tools
will call this script with the name of the changing interface and the string
"up" or "down" as arguments.

One such useful script is:

#!/bin/sh
/sbin/if$2 $1

This allows a laptop user to bring the network up just by plugging the cable in.
 Perhaps there is another way to do this, but I couldn't find it and this hack
was easy enough.

Beware, though, that my C is rusty, I haven't included a manpage patch, and this
is just a hack.  If this would be useful to others or might be included, I will
happily clean it up.

Comment 1 Jason Tibbitts 2002-08-30 21:42:47 UTC
Created attachment 74024 [details]
Patch to mii-tool

Comment 2 Phil Knirsch 2002-09-02 15:17:30 UTC
Will check to include sometime later.

Read ya, Pil


Note You need to log in before you can comment on or make changes to this bug.