diff options
author | James Falcon <james.falcon@canonical.com> | 2021-10-27 09:43:34 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-27 08:43:34 -0600 |
commit | 1d01da5d9916d97ef463ba61a36b3f98f8911419 (patch) | |
tree | 1022c172c252082a02f89d0e54a42221dabc1851 /tools/hook-hotplug | |
parent | 75b26b0afbb14cf613fe3b08c8bed050dec0b874 (diff) | |
download | vyos-cloud-init-1d01da5d9916d97ef463ba61a36b3f98f8911419.tar.gz vyos-cloud-init-1d01da5d9916d97ef463ba61a36b3f98f8911419.zip |
Add "install hotplug" module (SC-476) (#1069)
This commit removes automatically installing udev rules for hotplug
and adds a module to install them instead.
Automatically including the udev rules and checking if hotplug was
enabled consumed too many resources in certain circumstances. Moving the
rules to a module ensures we don't spend extra extra cycles on hotplug
if hotplug functionality isn't desired.
LP: #1946003
Diffstat (limited to 'tools/hook-hotplug')
-rwxr-xr-x | tools/hook-hotplug | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/tools/hook-hotplug b/tools/hook-hotplug index ced268b3..35bd3da2 100755 --- a/tools/hook-hotplug +++ b/tools/hook-hotplug @@ -8,11 +8,7 @@ is_finished() { [ -e /run/cloud-init/result.json ] } -hotplug_enabled() { - [ "$(cloud-init devel hotplug-hook -s "${SUBSYSTEM}" query)" == "enabled" ] -} - -if is_finished && hotplug_enabled; then +if is_finished; then # open cloud-init's hotplug-hook fifo rw exec 3<>/run/cloud-init/hook-hotplug-cmd env_params=( |