X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-console.git/blobdiff_plain/0831546bfd6cbfa9ec41f6e82b28d9a84fcf1cec..ea990341e40f67e1998fed6a1e6a8455782db73c:/debian/invirt-console-host.postinst diff --git a/debian/invirt-console-host.postinst b/debian/invirt-console-host.postinst new file mode 100755 index 0000000..9f4b5a8 --- /dev/null +++ b/debian/invirt-console-host.postinst @@ -0,0 +1,47 @@ +#!/bin/sh +# postinst script for invirt-console-host +# +# 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 + + +case "$1" in + configure) + # Clean up the old sudoers line before we add it back + perl -i.bak -ne 's%^### (BEGIN|END) invirt-console-host\s*$%%m && ($skip = ($1 eq "BEGIN")); print unless $skip;' /etc/sudoers + + cat >>/etc/sudoers <&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0