Skip to content

Commit

Permalink
d/cloud-init.postinst: change priority of hotplug rules
Browse files Browse the repository at this point in the history
Avoids LP: #1946003 on upgraded systems.

References:

[0] #4799
[1] b519d86
  • Loading branch information
aciba90 authored and blackboxsw committed Feb 15, 2024
1 parent bd6507a commit 22f7e45
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions debian/cloud-init.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,13 @@ change_cloud_init_output_log_permissions() {
fi
}

rename_hook_hotplug_udev_rule() {
# Avoids LP: #1946003 see commit: b519d861aff8b44a0610c176cb34adcbe28df144
if [ -f /etc/udev/rules.d/10-cloud-init-hook-hotplug.rules ]; then
mv -f /etc/udev/rules.d/10-cloud-init-hook-hotplug.rules \
/etc/udev/rules.d/90-cloud-init-hook-hotplug.rules
fi
}

if [ "$1" = "configure" ]; then
if db_get cloud-init/datasources; then
Expand Down Expand Up @@ -406,6 +413,8 @@ EOF

# Redact schema sensitive warning logs on invalid user-data
fix_1978422_redact_sensitive_logs_on_invalid_userdata_schema "$2"

rename_hook_hotplug_udev_rule
fi

#DEBHELPER#
Expand Down

0 comments on commit 22f7e45

Please sign in to comment.