User service foo rather than /etc/rc.d/foo.
devd predates service in the system. Modernize usage to use service to start/stop things in reaction to events rather than calling the rc file directly. This was pointed out in my talk at BSDcan as well as indirectly referrred to as a barrier to entry for OpenRC in that working group.
This commit is contained in:
parent
1463aa7444
commit
b5e2ff92e5
@ -57,7 +57,7 @@ notify 0 {
|
||||
match "system" "IFNET";
|
||||
match "type" "LINK_UP";
|
||||
media-type "ethernet";
|
||||
action "/etc/rc.d/dhclient quietstart $subsystem";
|
||||
action "service dhclient quietstart $subsystem";
|
||||
};
|
||||
|
||||
#
|
||||
@ -76,7 +76,7 @@ notify 0 {
|
||||
match "system" "IFNET";
|
||||
match "type" "LINK_UP";
|
||||
media-type "802.11";
|
||||
action "/etc/rc.d/dhclient quietstart $subsystem";
|
||||
action "service dhclient quietstart $subsystem";
|
||||
};
|
||||
|
||||
# An entry like this might be in a different file, but is included here
|
||||
@ -94,11 +94,11 @@ detach 100 {
|
||||
# When a USB Bluetooth dongle appears, activate it
|
||||
attach 100 {
|
||||
device-name "ubt[0-9]+";
|
||||
action "/etc/rc.d/bluetooth quietstart $device-name";
|
||||
action "service bluetooth quietstart $device-name";
|
||||
};
|
||||
detach 100 {
|
||||
device-name "ubt[0-9]+";
|
||||
action "/etc/rc.d/bluetooth quietstop $device-name";
|
||||
action "service bluetooth quietstop $device-name";
|
||||
};
|
||||
|
||||
# Firmware downloader for Atheros AR3011 based USB Bluetooth devices
|
||||
@ -111,11 +111,11 @@ detach 100 {
|
||||
# When a USB keyboard arrives, attach it as the console keyboard.
|
||||
attach 100 {
|
||||
device-name "ukbd0";
|
||||
action "/etc/rc.d/syscons setkeyboard /dev/ukbd0";
|
||||
action "service syscons setkeyboard /dev/ukbd0";
|
||||
};
|
||||
detach 100 {
|
||||
device-name "ukbd0";
|
||||
action "/etc/rc.d/syscons setkeyboard /dev/kbd0";
|
||||
action "service syscons setkeyboard /dev/kbd0";
|
||||
};
|
||||
|
||||
notify 100 {
|
||||
@ -124,7 +124,7 @@ notify 100 {
|
||||
match "type" "CREATE";
|
||||
match "cdev" "atp[0-9]+";
|
||||
|
||||
action "/etc/rc.d/moused quietstart $cdev";
|
||||
action "service moused quietstart $cdev";
|
||||
};
|
||||
|
||||
notify 100 {
|
||||
@ -133,7 +133,7 @@ notify 100 {
|
||||
match "type" "CREATE";
|
||||
match "cdev" "ums[0-9]+";
|
||||
|
||||
action "/etc/rc.d/moused quietstart $cdev";
|
||||
action "service moused quietstart $cdev";
|
||||
};
|
||||
|
||||
notify 100 {
|
||||
@ -142,7 +142,7 @@ notify 100 {
|
||||
match "type" "CREATE";
|
||||
match "cdev" "wsp[0-9]+";
|
||||
|
||||
action "/etc/rc.d/moused quietstart $cdev";
|
||||
action "service moused quietstart $cdev";
|
||||
};
|
||||
|
||||
notify 100 {
|
||||
@ -151,7 +151,7 @@ notify 100 {
|
||||
match "type" "DESTROY";
|
||||
match "cdev" "ums[0-9]+";
|
||||
|
||||
action "/etc/rc.d/moused stop $cdev";
|
||||
action "service moused stop $cdev";
|
||||
};
|
||||
|
||||
# Firmware download into the ActiveWire board. After the firmware download is
|
||||
@ -236,7 +236,7 @@ nomatch 10 {
|
||||
notify 10 {
|
||||
match "system" "ACPI";
|
||||
match "subsystem" "ACAD";
|
||||
action "/etc/rc.d/power_profile $notify";
|
||||
action "service power_profile $notify";
|
||||
};
|
||||
|
||||
# Notify all users before beginning emergency shutdown when we get
|
||||
@ -317,7 +317,7 @@ notify 10 {
|
||||
notify 0 {
|
||||
match "system" "RCTL";
|
||||
match "rule" "user:770:swap:.*";
|
||||
action "/usr/local/etc/rc.d/postgresql restart";
|
||||
action "service postgresql restart";
|
||||
};
|
||||
|
||||
# Discard autofs caches, useful for the -media special map.
|
||||
|
@ -76,5 +76,5 @@ notify 10 {
|
||||
match "system" "PMU";
|
||||
match "subsystem" "POWER";
|
||||
match "type" "ACLINE";
|
||||
action "/etc/rc.d/power_profile $notify";
|
||||
action "service power_profile $notify";
|
||||
};
|
||||
|
@ -9,7 +9,7 @@
|
||||
#
|
||||
# Generic NOMATCH event
|
||||
nomatch 100 {
|
||||
action "/etc/rc.d/devmatch start '?$_'";
|
||||
action "service devmatch start '?$_'";
|
||||
};
|
||||
|
||||
# Add the following to devd.conf to prevent this from running:
|
||||
|
Loading…
Reference in New Issue
Block a user