diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-10-26 01:45:19 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-10-26 01:45:19 +0000 |
commit | 48906a096ca334924a3f3885d492fe03092f22a5 (patch) | |
tree | de9fe0954cc5f91abc818ed674f6ccb77c775d12 | |
parent | 61cbb18369f44858bea63c61f968ad1d30b4508d (diff) | |
download | pfsense-48906a096ca334924a3f3885d492fe03092f22a5.zip pfsense-48906a096ca334924a3f3885d492fe03092f22a5.tar.gz |
Allow plugging and unplugging of ethernet interfaces (and wireless)
-rw-r--r-- | etc/devd.conf | 27 | ||||
-rwxr-xr-x | etc/rc.linkup | 1 |
2 files changed, 7 insertions, 21 deletions
diff --git a/etc/devd.conf b/etc/devd.conf index ae15b75..3faf937 100644 --- a/etc/devd.conf +++ b/etc/devd.conf @@ -3,6 +3,7 @@ options { directory "/etc/devd"; + directory "/usr/local/etc/devd"; pid-file "/var/run/devd.pid"; set scsi-controller-regex "(aac|adv|adw|aha|ahb|ahc|ahd|aic|amd|amr|asr|bt|ciss|ct|dpt|\ @@ -11,25 +12,13 @@ options { }; # Handle ethernet linkup and linkdown -attach 0 { - media-type "ethernet"; - action "/etc/rc.linkup $device-name start"; +notify 0 { + match "type" "LINK_UP"; + action "/usr/local/bin/php -f /etc/rc.linkup $subsystem start"; }; - -detach 0 { - media-type "ethernet"; - action "/etc/rc.linkup $device-name stop"; -}; - -# Handle wireless linkup and linkdown -detach 0 { - media-type "802.11"; - action "/etc/rc.linkup $device-name start"; -}; - -attach 0 { - media-type "802.11"; - action "/etc/rc.linkup $device-name stop"; +notify 0 { + match "type" "LINK_DOWN"; + action "/usr/local/bin/php -f /etc/rc.linkup $subsystem stop"; }; # When a USB keyboard arrives, attach it as the console keyboard. @@ -37,7 +26,6 @@ attach 100 { device-name "ukbd0"; action "kbdcontrol -k /dev/ukbd0 < /dev/console"; }; - detach 100 { device-name "ukbd0"; action "kbdcontrol -k /dev/kbd0 < /dev/console"; @@ -52,4 +40,3 @@ notify 10 { match "notify" "0xcc"; action "logger -p kern.emerg 'WARNING: system temperature too high, shutting down soon!'"; }; - diff --git a/etc/rc.linkup b/etc/rc.linkup index fc73327..5a77d28 100755 --- a/etc/rc.linkup +++ b/etc/rc.linkup @@ -36,7 +36,6 @@ if($argv[2] == "stop" or $argv[2] == "down") { log_error("DEVD Ethernet detached event for {$argv[1]}"); exec("/sbin/ifconfig {$argv[1]} delete"); - exec("/sbin/ifconfig {$argv[1]} down"); exec("/usr/sbin/arp -da"); exit; } |