diff --git a/xCAT-nbroot2/debian/xcat-genesis-amd64.postinst b/xCAT-nbroot2/debian/xcat-genesis-amd64.postinst index feb0937d5..35bf74c2d 100644 --- a/xCAT-nbroot2/debian/xcat-genesis-amd64.postinst +++ b/xCAT-nbroot2/debian/xcat-genesis-amd64.postinst @@ -20,13 +20,13 @@ set -e case "$1" in configure) - ;; - - upgrade) + if [ -f /tmp/xCAT-genesis_upgrade.tmp ];then if [ -f "/proc/cmdline" ]; then # prevent running it during install into chroot image . /etc/profile.d/xcat.sh mknb x86_64 fi + rm /tmp/xCAT-genesis_upgrade.tmp + fi ;; abort-upgrade|abort-remove|abort-deconfigure) diff --git a/xCAT-nbroot2/debian/xcat-genesis-amd64.prerm b/xCAT-nbroot2/debian/xcat-genesis-amd64.prerm new file mode 100644 index 000000000..155110d63 --- /dev/null +++ b/xCAT-nbroot2/debian/xcat-genesis-amd64.prerm @@ -0,0 +1,41 @@ +#!/bin/sh +# prerm script for xCAT-nbroot2 +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + upgrade) + touch /tmp/xCAT-genesis_upgrade.tmp + ;; + remove|deconfigure) + ;; + + failed-upgrade) + ;; + + *) + echo "prerm 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