#!/bin/sh set -e . /usr/share/debconf/confmodule upgrade () { if [ ! -z "$2" ] && dpkg --compare-versions "$2" le "1:3.0.2-1~exp+3"; then db_get lxc/auto_update_config res="$RET" if [ "$res" = "true" ]; then lxc-update-config -c /etc/lxc/default.conf find /var/lib/lxc -maxdepth 2 -iname "config" -exec /usr/bin/lxc-update-config -c {} \; fi fi if [ -z "$2" ] || dpkg --compare-versions "$2" le "1:3.1.0+really3.0.3-2"; then if command -v apparmor_parser > /dev/null && [ -e /etc/apparmor.d/lxc-containers ]; then apparmor_parser -r -W -T /etc/apparmor.d/lxc-containers || \ echo "Failed to run 'apparmor_parser -rWT /etc/apparmor.d/lxc-containers'. You will probably need to run it by hand at some point." fi fi } case "$1" in configure) upgrade "$@" ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac #DEBHELPER# db_stop exit 0