#!/bin/sh set -e if [ "${1}" = "install" ] || [ "${1}" = "upgrade" ] ; then # The file /etc/glance/rootwrap.conf in buster was copied from # /usr/share/glance-common/rootwrap.conf from the glance-common # package during postinst. In Bullseye, it becomes a CONFFILE # owned by the glance-store-common package. To avoid prompting # during upgrade from Buster to Bullseye, we therefore need to # get the file away before installing glance-store-common, # otherwise dpkg will prompt the user interactively. # # Of course, this wont be needed in Bookworms anymore. if [ -e /etc/glance/rootwrap.conf ] ; then # We only remove the file if it wasn't manually modified # by the user (in which case dpkg prompting is the correct # thing to do). So we just use the MD5 to see if it's the # same file. MD5=$(md5sum /etc/glance/rootwrap.conf | awk '{print $1}') if [ "${MD5}" = "38f96ec95f09ffb192ee2febc6f771a1" ] ; then rm /etc/glance/rootwrap.conf fi fi fi