From b5e2ff92e572d59242b3627b66fb9789f86f0266 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Mon, 11 Jun 2018 22:48:34 +0000 Subject: 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. --- etc/devd.conf | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'etc/devd.conf') diff --git a/etc/devd.conf b/etc/devd.conf index 775a41f7deae..956a2970d436 100644 --- a/etc/devd.conf +++ b/etc/devd.conf @@ -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. -- cgit v1.2.3