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] canonical#4799
[1] canonical@b519d86
  • Loading branch information
aciba90 authored and blackboxsw committed Feb 16, 2024
1 parent 385c82e commit 154458b
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 @@ -359,6 +359,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 @@ -393,6 +400,8 @@ EOF
cleanup_ureadahead "$2"
fix_lp1889555 "$2"
change_cloud_init_output_log_permissions "$2"

rename_hook_hotplug_udev_rule
fi

#DEBHELPER#
Expand Down

0 comments on commit 154458b

Please sign in to comment.