X-Git-Url: https://code.grnet.gr/git/pithos-web-client/blobdiff_plain/2c592013dff358ba9328f1502bd84749faa43cf7..1f332c453f34642f62c4fed364837150327ec8c8:/debian/snf-pithos-webclient.postinst diff --git a/debian/snf-pithos-webclient.postinst b/debian/snf-pithos-webclient.postinst new file mode 100644 index 0000000..0441a9c --- /dev/null +++ b/debian/snf-pithos-webclient.postinst @@ -0,0 +1,49 @@ +#!/bin/sh +# postinst script for snf-pithos-webclient +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + +PKGNAME=snf-pithos-webclient + +case "$1" in + configure) + conf_files=$(dpkg-query -W -f='${Conffiles}' $PKGNAME | \ + awk '/\/etc\/synnefo/ { print $1 }') + for f in $conf_files; do + if ! dpkg-statoverride --list $f; then + dpkg-statoverride --update --add root synnefo 0640 $f + fi + done + + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 +