Project

General

Profile

Download (3.39 KB) Statistics
| Branch: | Tag: | Revision:
1
#
2
# pfSense-devd.conf
3
#
4
# part of pfSense (https://www.pfsense.org)
5
# Copyright (c) 2004-2013 BSD Perimeter
6
# Copyright (c) 2013-2016 Electric Sheep Fencing
7
# Copyright (c) 2014-2022 Rubicon Communications, LLC (Netgate)
8
# All rights reserved.
9
#
10
# Licensed under the Apache License, Version 2.0 (the "License");
11
# you may not use this file except in compliance with the License.
12
# You may obtain a copy of the License at
13
#
14
# http://www.apache.org/licenses/LICENSE-2.0
15
#
16
# Unless required by applicable law or agreed to in writing, software
17
# distributed under the License is distributed on an "AS IS" BASIS,
18
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
# See the License for the specific language governing permissions and
20
# limitations under the License.
21

    
22
options {
23
	directory "/etc/devd";
24
	directory "/usr/local/etc/devd";
25
	pid-file "/var/run/devd.pid";
26
	set scsi-controller-regex
27
		"(aac|adv|adw|aha|ahb|ahc|ahd|aic|amd|amr|asr|bt|ciss|ct|dpt|\
28
		esp|ida|iir|ips|isp|mlx|mly|mpt|ncr|ncv|nsp|stg|sym|trm|wds)\
29
		[0-9]+";
30
};
31

    
32
# CARP notify hooks. This will call carpup/carpdown with the
33
# interface (carp0, carp1) as the first parameter.
34
notify 100 {
35
    match "system"          "CARP";
36
    match "type"            "MASTER";
37
    action "/usr/local/sbin/pfSctl -c 'interface carpmaster '$subsystem";
38
};
39

    
40
notify 100 {
41
    match "system"          "CARP";
42
    match "type"            "BACKUP";
43
    action "/usr/local/sbin/pfSctl -c 'interface carpbackup '$subsystem";
44
};
45

    
46
notify 100 {
47
    match "system"          "CARP";
48
    match "type"            "INIT";
49
    action "/usr/local/sbin/pfSctl -c 'interface carpbackup '$subsystem";
50
};
51

    
52
# When a USB keyboard arrives, attach it as the console keyboard.
53
attach 100 {
54
	device-name "ukbd0";
55
	action "kbdcontrol -k /dev/ukbd0 < /dev/console 2>/dev/null";
56
};
57

    
58
detach 100 {
59
	device-name "ukbd0";
60
	action "kbdcontrol -k /dev/kbd0 < /dev/console 2>/dev/null";
61
};
62

    
63
#
64
# Signal upper levels that an event happened on ethernet class interface
65
#
66
notify 0 {
67
        match "system"          "IFNET";
68
        match "type"            "LINK_UP";
69
        media-type              "ethernet";
70
	action "/usr/local/sbin/pfSctl -c 'interface linkup start '$subsystem";
71
};
72

    
73
notify 0 {
74
        match "system"          "IFNET";
75
	match "type"            "LINK_DOWN";
76
	media-type              "ethernet";
77
	action "/usr/local/sbin/pfSctl -c 'interface linkup stop '$subsystem";
78
};
79

    
80
#
81
# Signal upper levels that an event happened on 802.11 class interface
82
#
83
notify 0 {
84
        match "system"          "IFNET";
85
        match "type"            "LINK_UP";
86
	match "subsystem"	"[a-z]+[0-9]+_wlan[0-9]+";
87
	action "/usr/local/sbin/pfSctl -c 'interface linkup start '$subsystem";
88
};
89

    
90
# USB NIC 
91
notify 0 {
92
        match "system"          "IFNET";
93
        match "type"            "ATTACH";
94
	match "subsystem"	"ue[0-9]+";
95
	action "/usr/local/sbin/pfSctl -c 'interface linkup start '$subsystem";
96
};
97

    
98
notify 0 {
99
        match "system"          "IFNET";
100
        match "type"            "DETACH";
101
	match "subsystem"	"ue[0-9]+";
102
	action "/usr/local/sbin/pfSctl -c 'interface linkup stop '$subsystem";
103
};
104

    
105
# Notify all users before beginning emergency shutdown when we get
106
# a _CRT or _HOT thermal event and we're going to power down the system
107
# very soon.
108
notify 10 {
109
	match "system"		"ACPI";
110
	match "subsystem"	"Thermal";
111
	match "notify"		"0xcc";
112
	action "logger -p kern.emerg WARNING: system temperature too high, shutting down soon!";
113
};
(11-11/85)