FreeBSD Bugzilla – Attachment 222920 Details for
Bug 253959
service(8) env call with LDAP makes boot take many hours
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
PoC
service.diff (text/plain), 4.51 KB, created by
Brad Davis
on 2021-03-02 17:16:48 UTC
(
hide
)
Description:
PoC
Filename:
MIME Type:
Creator:
Brad Davis
Created:
2021-03-02 17:16:48 UTC
Size:
4.51 KB
patch
obsolete
>diff --git a/sbin/devd/devd.conf b/sbin/devd/devd.conf >index dba7d41402d..924518a3547 100644 >--- a/sbin/devd/devd.conf >+++ b/sbin/devd/devd.conf >@@ -58,7 +58,7 @@ notify 0 { > match "system" "IFNET"; > match "type" "LINK_UP"; > media-type "ethernet"; >- action "service dhclient quietstart $subsystem"; >+ action "service -L dhclient quietstart $subsystem"; > }; > > # >@@ -77,7 +77,7 @@ notify 0 { > match "system" "IFNET"; > match "type" "LINK_UP"; > media-type "802.11"; >- action "service dhclient quietstart $subsystem"; >+ action "service -L dhclient quietstart $subsystem"; > }; > > # An entry like this might be in a different file, but is included here >@@ -95,11 +95,11 @@ detach 100 { > # When a USB Bluetooth dongle appears, activate it > attach 100 { > device-name "ubt[0-9]+"; >- action "service bluetooth quietstart $device-name"; >+ action "service -L bluetooth quietstart $device-name"; > }; > detach 100 { > device-name "ubt[0-9]+"; >- action "service bluetooth quietstop $device-name"; >+ action "service -L bluetooth quietstop $device-name"; > }; > > # Firmware downloader for Atheros AR3011 based USB Bluetooth devices >@@ -112,11 +112,11 @@ detach 100 { > # When a USB keyboard arrives, attach it as the console keyboard. > attach 100 { > device-name "ukbd0"; >- action "service syscons setkeyboard /dev/ukbd0"; >+ action "service -L syscons setkeyboard /dev/ukbd0"; > }; > detach 100 { > device-name "ukbd0"; >- action "service syscons setkeyboard /dev/kbd0"; >+ action "service -L syscons setkeyboard /dev/kbd0"; > }; > > notify 100 { >@@ -125,7 +125,7 @@ notify 100 { > match "type" "CREATE"; > match "cdev" "atp[0-9]+"; > >- action "service moused quietstart $cdev"; >+ action "service -L moused quietstart $cdev"; > }; > > notify 100 { >@@ -134,7 +134,7 @@ notify 100 { > match "type" "CREATE"; > match "cdev" "ums[0-9]+"; > >- action "service moused quietstart $cdev"; >+ action "service -L moused quietstart $cdev"; > }; > > notify 100 { >@@ -143,7 +143,7 @@ notify 100 { > match "type" "CREATE"; > match "cdev" "wsp[0-9]+"; > >- action "service moused quietstart $cdev"; >+ action "service -L moused quietstart $cdev"; > }; > > notify 100 { >@@ -152,7 +152,7 @@ notify 100 { > match "type" "DESTROY"; > match "cdev" "ums[0-9]+"; > >- action "service moused stop $cdev"; >+ action "service -L moused stop $cdev"; > }; > > # This entry starts the ColdSync tool in daemon mode. Make sure you have an up >@@ -219,7 +219,7 @@ nomatch 10 { > notify 10 { > match "system" "ACPI"; > match "subsystem" "ACAD"; >- action "service power_profile $notify"; >+ action "service -L power_profile $notify"; > }; > > # Notify all users before beginning emergency shutdown when we get >@@ -300,7 +300,7 @@ notify 10 { > notify 0 { > match "system" "RCTL"; > match "rule" "user:770:swap:.*"; >- action "service postgresql restart"; >+ action "service -L postgresql restart"; > }; > > # Discard autofs caches, useful for the -media special map. >diff --git a/sbin/devd/devmatch.conf b/sbin/devd/devmatch.conf >index 902c96f3366..047917ca618 100644 >--- a/sbin/devd/devmatch.conf >+++ b/sbin/devd/devmatch.conf >@@ -9,7 +9,7 @@ > # > # Generic NOMATCH event > nomatch 100 { >- action "service devmatch quietstart '?'$_"; >+ action "service -L devmatch quietstart '?'$_"; > }; > > # Add the following to devd.conf to prevent this from running: >diff --git a/usr.sbin/service/service.sh b/usr.sbin/service/service.sh >index 42a50fcf61b..5fa44043380 100755 >--- a/usr.sbin/service/service.sh >+++ b/usr.sbin/service/service.sh >@@ -44,17 +44,19 @@ usage () { > echo '-e Show services that are enabled' > echo "-R Stop and start enabled $local_startup services" > echo "-l List all scripts in /etc/rc.d and $local_startup" >+ echo "-L Disable environment variable definitions from login.conf" > echo '-r Show the results of boot time rcorder' > echo '-v Verbose' > echo '' > } > >-while getopts 'j:ehlrRv' COMMAND_LINE_ARGUMENT ; do >+while getopts 'j:ehlLrRv' COMMAND_LINE_ARGUMENT ; do > case "${COMMAND_LINE_ARGUMENT}" in > j) JAIL="${OPTARG}" ;; > e) ENABLED=eopt ;; > h) usage ; exit 0 ;; > l) LIST=lopt ;; >+ L) DISABLE_LOGIN=1 ;; > r) RCORDER=ropt ;; > R) RESTART=Ropt ;; > v) VERBOSE=vopt ;; >@@ -165,7 +167,11 @@ cd / > for dir in /etc/rc.d $local_startup; do > if [ -x "$dir/$script" ]; then > [ -n "$VERBOSE" ] && echo "$script is located in $dir" >- exec env -i -L 0/daemon HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin "$dir/$script" "$@" >+ if [ -n "${DISABLE_LOGIN}" ]; then >+ exec env -i HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin "$dir/$script" "$@" >+ else >+ exec env -i -L 0/daemon HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin "$dir/$script" "$@" >+ fi > fi > done >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 253959
: 222920 |
222931