non_native package use this script, update sample using real content

This commit is contained in:
baiyuan 2014-10-17 03:22:36 -04:00
parent 5ad09597bd
commit b9577cb9ef

View File

@ -1,3 +1,21 @@
#!/bin/sh
echo "running sample-comp1 genimage_post script"
rpmdir="/opt/xcat/kits/<<<buildkit_WILL_INSERT_kit_basename_HERE>>>/<<<buildkit_WILL_INSERT_kitcomponent_name_HERE>>>"
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