run mknb only the xCAT-genesis upgrade

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14172 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
xq2005 2012-10-31 09:26:08 +00:00
parent df1896dca8
commit 3c84ec61cb
2 changed files with 44 additions and 3 deletions

View File

@ -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)

View File

@ -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:
# * <prerm> `remove'
# * <old-prerm> `upgrade' <new-version>
# * <new-prerm> `failed-upgrade' <old-version>
# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
# * <deconfigured's-prerm> `deconfigure' `in-favour'
# <package-being-installed> <version> `removing'
# <conflicting-package> <version>
# 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