diff options
author | Li xin <lixin.fnst@cn.fujitsu.com> | 2014-12-12 13:15:32 +0800 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2014-12-19 20:10:56 +0100 |
commit | e2f8425e2d806e511489694ec338c6299eddcddd (patch) | |
tree | c9fd885f37dc86bfa48d97a5143db5ef4e01318f /meta-oe/recipes-support/openwbem/openwbem/rmmof.sh | |
parent | 6781f9b5dc60bbd39727aeaa74c13dd31eb73838 (diff) | |
download | meta-openembedded-contrib-e2f8425e2d806e511489694ec338c6299eddcddd.tar.gz |
openwbem: add new recipe
OpenWBEM is a set of software components that help facilitate
deployment of the Common Information Model (CIM) and Web-Based
Enterprise Management (WBEM) technologies of the Distributed Management
Task Force (DMTF).
Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/openwbem/openwbem/rmmof.sh')
-rw-r--r-- | meta-oe/recipes-support/openwbem/openwbem/rmmof.sh | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/openwbem/openwbem/rmmof.sh b/meta-oe/recipes-support/openwbem/openwbem/rmmof.sh new file mode 100644 index 0000000000..a495415be5 --- /dev/null +++ b/meta-oe/recipes-support/openwbem/openwbem/rmmof.sh @@ -0,0 +1,53 @@ +#!/bin/sh +# +# options: +# rmmof.sh <MOF_PATH> <NAMESPACE> <FILES> +# +# - or - +# +# options: +# loadmof.sh -n <NAMESPACE> <FILES> [...] +# +# The former is preserved for compatibility with Pegasus and +# sblim providers. The latter is preferred. If $1 is "-n", +# the latter code path is executed. Otherwise the former is +# executed. + +if [ "x$3" = "x" ]; then + echo "Usage: $0 -n <NAMESPACE> <FILES> [...]" + exit 1 +fi + +# get rid of "-n" arg +shift + +NS="$1" + +shift + +DBDIR=/var/lib/openwbem +CIMOM_INIT=/etc/init.d/owcimomd +if [ "$YAST_IS_RUNNING" != "instsys" ] ; then + $CIMOM_INIT status + CIMOM_RUNNING=$? +fi +if [ "x$CIMOM_RUNNING" = "x0" ]; then + $CIMOM_INIT stop +fi +bkpdir=/tmp/owrep.bkp-$$ +mkdir $bkpdir +cp -a $DBDIR $bkpdir/ +echo "Compiling MOF files" +/usr/bin/owmofc -r -n $NS -d $DBDIR "$@" > /dev/null 2>&1 +RVAL=$? +if [ "x$RVAL" != "x0" ]; then + echo "MOF import failed!" + rm -rf $DBDIR + mv $bkpdir/openwbem $DBDIR +fi +rm -rf $bkpdir +if [ "x$CIMOM_RUNNING" = "x0" ]; then + $CIMOM_INIT start +fi +exit $RVAL + |