From b9577cb9ef96e5b1c4af8cc0510d3d5c65525214 Mon Sep 17 00:00:00 2001 From: baiyuan Date: Fri, 17 Oct 2014 03:22:36 -0400 Subject: [PATCH] non_native package use this script, update sample using real content --- .../scripts/sample/genimage_post.sh | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/xCAT-buildkit/share/xcat/kits/kit_template/scripts/sample/genimage_post.sh b/xCAT-buildkit/share/xcat/kits/kit_template/scripts/sample/genimage_post.sh index af4636987..98829792d 100644 --- a/xCAT-buildkit/share/xcat/kits/kit_template/scripts/sample/genimage_post.sh +++ b/xCAT-buildkit/share/xcat/kits/kit_template/scripts/sample/genimage_post.sh @@ -1,3 +1,21 @@ +#!/bin/sh -echo "running sample-comp1 genimage_post script" +rpmdir="/opt/xcat/kits/<<>>/<<>>" +if [[ ! -z "$installroot" ]]; then + if [ -n "`ls $installroot$rpmdir/*.deb 2> /dev/null`" ] ; then + dpkg -i --force-all --instdir=$installroot $installroot$rpmdir/*.deb + + elif [ -n "`ls $installroot$rpmdir/*.rpm 2> /dev/null`" ] ; then + rpm --force --root $installroot -Uvh $installroot$rpmdir/*.rpm + fi +else + if [ -n "`ls $rpmdir/*.deb 2> /dev/null`" ] ; then + dpkg -i --force-all $rpmdir/*.deb + + elif [ -n "`ls $rpmdir/*.rpm 2> /dev/null`" ] ; then + rpm --force -Uvh $rpmdir/*.rpm + fi +fi + +exit 0