You can subscribe to this list here.
2005 |
Jan
|
Feb
(1) |
Mar
(45) |
Apr
(150) |
May
(145) |
Jun
(150) |
Jul
(79) |
Aug
(313) |
Sep
(160) |
Oct
(309) |
Nov
(115) |
Dec
(60) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(160) |
Feb
(144) |
Mar
(127) |
Apr
(48) |
May
(102) |
Jun
(54) |
Jul
(245) |
Aug
(94) |
Sep
(152) |
Oct
(162) |
Nov
(166) |
Dec
(740) |
2007 |
Jan
(752) |
Feb
(437) |
Mar
(328) |
Apr
(373) |
May
(569) |
Jun
(399) |
Jul
(369) |
Aug
(627) |
Sep
(100) |
Oct
(306) |
Nov
(166) |
Dec
(282) |
2008 |
Jan
(68) |
Feb
(145) |
Mar
(180) |
Apr
(160) |
May
(277) |
Jun
(229) |
Jul
(1188) |
Aug
(51) |
Sep
(97) |
Oct
(99) |
Nov
(95) |
Dec
(170) |
2009 |
Jan
(39) |
Feb
(73) |
Mar
(120) |
Apr
(121) |
May
(104) |
Jun
(262) |
Jul
(57) |
Aug
(171) |
Sep
(131) |
Oct
(88) |
Nov
(64) |
Dec
(83) |
2010 |
Jan
(55) |
Feb
(67) |
Mar
(124) |
Apr
(64) |
May
(130) |
Jun
(75) |
Jul
(164) |
Aug
(64) |
Sep
(44) |
Oct
(17) |
Nov
(43) |
Dec
(31) |
2011 |
Jan
(21) |
Feb
(10) |
Mar
(43) |
Apr
(46) |
May
(52) |
Jun
(71) |
Jul
(7) |
Aug
(16) |
Sep
(51) |
Oct
(14) |
Nov
(33) |
Dec
(15) |
2012 |
Jan
(12) |
Feb
(61) |
Mar
(129) |
Apr
(76) |
May
(70) |
Jun
(52) |
Jul
(29) |
Aug
(41) |
Sep
(32) |
Oct
(23) |
Nov
(38) |
Dec
(26) |
2013 |
Jan
(35) |
Feb
(37) |
Mar
(51) |
Apr
(15) |
May
(52) |
Jun
(15) |
Jul
(23) |
Aug
(21) |
Sep
(46) |
Oct
(69) |
Nov
(57) |
Dec
(26) |
2014 |
Jan
(5) |
Feb
(13) |
Mar
(17) |
Apr
(1) |
May
(5) |
Jun
|
Jul
(2) |
Aug
(2) |
Sep
(1) |
Oct
(16) |
Nov
(8) |
Dec
(4) |
2015 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
(4) |
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
From: Viktor M. <mih...@us...> - 2005-05-03 07:49:11
|
Update of /cvsroot/sblim/cmpi-fsvol/mof In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15158/mof Removed Files: Linux_Fsvol.sfcb.reg Linux_FsvolRegister.mof Log Message: Removed all registration files. --- Linux_Fsvol.sfcb.reg DELETED --- --- Linux_FsvolRegister.mof DELETED --- |
From: Viktor M. <mih...@us...> - 2005-05-02 15:50:19
|
Update of /cvsroot/sblim/cmpi-fsvol In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28234 Modified Files: ChangeLog Makefile.am provider-register.sh sblim-cmpi-fsvol.spec.in Log Message: Updated to current provider register/deregister template. Index: Makefile.am =================================================================== RCS file: /cvsroot/sblim/cmpi-fsvol/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Makefile.am 20 Apr 2005 11:40:19 -0000 1.2 +++ Makefile.am 2 May 2005 15:50:07 -0000 1.3 @@ -110,15 +110,7 @@ # Automake instructions for ./mof subdir # SCHEMAS=mof/Linux_Fsvol.mof -REGISTRATIONS.pegasus=mof/Linux_FsvolRegister.mof -REGISTRATIONS.sfcb=mof/Linux_Fsvol.sfcb.reg -REGISTRATIONS.openwbem= -REGISTRATIONS.sniacimom= - -REGISTRATIONS=$(REGISTRATIONS.pegasus) \ - $(REGISTRATIONS.sfcb) \ - $(REGISTRATIONS.openwbem) \ - $(REGISTRATIONS.sniacimom) +REGISTRATIONS=mof/Linux_Fsvol.registration # We must explicity add all the schema files to the distribution package pkgdata_DATA=$(SCHEMAS) $(REGISTRATIONS) @@ -127,10 +119,10 @@ # Register the provider(s) and class definition(s) to the current CIM server/CIMOM postinstall: - test x"$(SCHEMAS)" != x && \ - sh provider-register.sh -t @CIMSERVER@ -s $(SCHEMAS) - test x"$(REGISTRATIONS.@CIMSERVER@)" != x && \ - sh provider-register.sh -t @CIMSERVER@ -r $(REGISTRATIONS.@CIMSERVER@) + sh provider-register.sh -t @CIMSERVER@ -r $(REGISTRATIONS) -m $(SCHEMAS) + +preuninstall: + sh provider-register.sh -d -t @CIMSERVER@ -r $(REGISTRATIONS) -m $(SCHEMAS) dist-hook: test -d "$(distdir)" && rm -rf `find $(distdir) -type d -name CVS` Index: sblim-cmpi-fsvol.spec.in =================================================================== RCS file: /cvsroot/sblim/cmpi-fsvol/sblim-cmpi-fsvol.spec.in,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- sblim-cmpi-fsvol.spec.in 15 Apr 2005 14:28:15 -0000 1.1 +++ sblim-cmpi-fsvol.spec.in 2 May 2005 15:50:07 -0000 1.2 @@ -9,7 +9,7 @@ Summary: SBLIM FSVOL Instrumentation Name: @PACKAGE_TARNAME@ Version: @PACKAGE_VERSION@ -Release: @CIMSERVER@ +Release: 1 Group: Systems Management/Base License: Common Public License 1.0 @@ -79,17 +79,17 @@ # Register Schema and Provider - this is higly provider specific %define SCHEMA %{_datadir}/%{name}/Linux_Fsvol.mof -%define REGISTRATION_pegasus %{_datadir}/%{name}/Linux_FsvolRegister.mof -%define REGISTRATION_sfcb %{_datadir}/%{name}/Linux_Fsvol.sfcb.reg +%define REGISTRATION %{_datadir}/%{name}/Linux_Fsvol.registration +%{_datadir}/%{name}/provider-register.sh \ + -r %{REGISTRATION} -m %{SCHEMA} > /dev/null -%{_datadir}/%{name}/provider-register.sh -t @CIMSERVER@ \ - -s %{SCHEMA} > /dev/null +/sbin/ldconfig -%{_datadir}/%{name}/provider-register.sh -t @CIMSERVER@ \ - -r %{REGISTRATION_@CIMSERVER@} > /dev/null +%preun -/sbin/ldconfig +%{_datadir}/%{name}/provider-register.sh -d \ + -r %{REGISTRATION} -m %{SCHEMA} > /dev/null %postun /sbin/ldconfig Index: provider-register.sh =================================================================== RCS file: /cvsroot/sblim/cmpi-fsvol/provider-register.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- provider-register.sh 15 Apr 2005 14:28:15 -0000 1.1 +++ provider-register.sh 2 May 2005 15:50:07 -0000 1.2 @@ -12,68 +12,481 @@ # # Author: Viktor Mihajlovski <mih...@de...> # Contributors: -# Description: Script to install class definitions (MOFs) and registration data -# for a variety of supported CIMOMs +# Description: Script to install class definitions (MOFs) and +# registration data for a variety of supported CIMOMs # ================================================================== + +function pegasus_path() +{ + for p in /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin \ + /opt/tog-pegasus/bin /opt/tog-pegasus/sbin $PEGASUS_HOME/bin + do + if test -x $p/$1 + then + echo $p/$1 + return 0 + fi + done + return 1 +} + +function pegasus_transform() +{ + OUTFILE=$1 + shift + regfiles=$* + PROVIDERMODULES=`cat $regfiles 2> /dev/null | grep -v '^[[:space:]]*#.*' | cut -d ' ' -f 4 | sort | uniq` + if test x"$PROVIDERMODULES" == x + then + echo Failed to read registration files >&2 + return 1 + fi + PROVIDERS=`cat $regfiles 2> /dev/null | grep -v '^[[:space:]]*#.*' | cut -d ' ' -f 3-4 | sort | uniq` + +# produce ProviderModules + echo > $OUTFILE + chatter "Processing provider modules:" $PROVIDERMODULES + for pm in $PROVIDERMODULES + do + cat >> $OUTFILE <<EOFPM +instance of PG_ProviderModule +{ + Name = "$pm"; + Location = "$pm"; + Vendor = "SBLIM"; + Version = "2.0.0"; + InterfaceType = "CMPI"; + InterfaceVersion = "2.0.0"; +}; + +EOFPM + done + +# produce Providers + set -- $PROVIDERS + while test x$1 != x + do + cat >> $OUTFILE <<EOFP +instance of PG_Provider +{ + Name = "$1"; + ProviderModuleName = "$2"; +}; + +EOFP + shift 2 + done + +#produce Capabilities + for rf in $regfiles + do + cat $rf | grep -v '^[[:space:]]*#.*' | while read CLASSNAME NAMESPACE PROVIDERNAME PROVIDERMODULE CAPS + do + numcap= + for cap in $CAPS + do + case $cap in + instance) + if test x$numcap == x + then numcap=2 + else numcap="$numcap, 2" + fi;; + association) + if test x$numcap == x + then numcap=3 + else numcap="$numcap, 3" + fi;; + indication) + if test x$numcap == x + then numcap=4 + else numcap="$numcap, 4" + fi;; + method) + if test x$numcap == x + then numcap=5 + else numcap="$numcap, 5" + fi;; + **) echo unknown provider type $cap >&2 + return 1;; + esac + done + cat >> $OUTFILE <<EOFC +instance of PG_ProviderCapabilities +{ + ProviderModuleName = "$PROVIDERMODULE"; + ProviderName = "$PROVIDERNAME"; + ClassName = "$CLASSNAME"; + ProviderType = { $numcap }; + Namespaces = {"$NAMESPACE"}; + SupportedProperties = NULL; + SupportedMethods = NULL; + CapabilityID = "1"; +}; + +EOFC + done + done +} + function pegasus_install() { if ps -C cimserver > /dev/null 2>&1 then - CIMMOF=cimmof + CIMMOF=`pegasus_path cimmof` + if test $? != 0 + then + echo "Error: cimmof not found" >&2 + return 1 + fi state=active else - CIMMOF=cimmofl + CIMMOF=`pegasus_path cimmofl` + if test $? != 0 + then + echo "Error: cimmof not found" >&2 + return 1 + fi state=inactive fi + + mymofs= + mregs= + mofmode=1 + while test x$1 != x + do + if test $1 == ":" + then + mofmode=0 + shift + continue + fi + if test $mofmode == 1 + then + mymofs="$mymofs $1" + else + myregs="$myregs $1" + fi + shift + done + + for _TEMPDIR in /var/tmp /tmp + do + if test -w $_TEMPDIR + then + _REGFILENAME=$_TEMPDIR/$$.mof + break + fi + done + - if test $1 == mofs - then - NAMESPACE=root/cimv2 - action="Installing Schemas" - else if test $1 == regs + trap "rm -f $_REGFILENAME" EXIT + + if pegasus_transform $_REGFILENAME $myregs then - NAMESPACE=root/PG_Interop - action="Registering Providers" + chatter Registering providers with $state cimserver + $CIMMOF -n root/cimv2 $mymofs && + $CIMMOF -n root/PG_Interop $_REGFILENAME else - echo "Invalid install mode " $1 + echo "Failed to build pegasus registration MOF." >&2 return 1 fi +} + +function pegasus_uninstall() +{ + mymofs= + mregs= + mofmode=1 + while test x$1 != x + do + if test $1 == ":" + then + mofmode=0 + shift + continue + fi + if test $mofmode == 1 + then + mymofs="$mymofs $1" + else + myregs="$myregs $1" + fi + shift + done + + if ps -C cimserver > /dev/null 2>&1 + then + PROVIDERMODULES=`cat $myregs 2> /dev/null | grep -v '^[[:space:]]*#.*' | cut -d ' ' -f 4 | sort | uniq` + if test x"$PROVIDERMODULES" == x + then + echo Failed to read registration files >&2 + return 1 + fi + CIMPROVIDER=`pegasus_path cimprovider` + if test $? != 0 + then + echo "Error: cimprovider not found" >&2 + return 1 + fi + for pm in $PROVIDERMODULES + do + chatter "Remove provider module" $pm + $CIMPROVIDER -d -m $pm > /dev/null && + $CIMPROVIDER -r -m $pm > /dev/null + done + WBEMEXEC=`pegasus_path wbemexec` + if test $? != 0 + then + echo "Error: wbemexec not found" >&2 + return 1 + fi + CLASSES=`cat $myregs 2> /dev/null | grep -v '^[[:space:]]*#.*' | cut -d ' ' -f 1` + for cls in $CLASSES + do + chatter Delete CIM Class $cls + $WBEMEXEC > /dev/null <<EOFWX +<?xml version="1.0" encoding="utf-8" ?> +<CIM CIMVERSION="2.0" DTDVERSION="2.0"> + <MESSAGE ID="4711" PROTOCOLVERSION="1.0"> + <SIMPLEREQ> + <IMETHODCALL NAME="DeleteClass"> + <LOCALNAMESPACEPATH> + <NAMESPACE NAME="root"></NAMESPACE> + <NAMESPACE NAME="cimv2"></NAMESPACE> + </LOCALNAMESPACEPATH> + <IPARAMVALUE NAME="ClassName"> + <CLASSNAME NAME="$cls"/> + </IPARAMVALUE> + </IMETHODCALL> + </SIMPLEREQ> + </MESSAGE> +</CIM> +EOFWX + done + else + echo "Sorry, cimserver must be running to deregister the providers." >&2 + return 1 fi +} +function sfcb_transform() +{ + OUTFILE=$1 shift - echo $action with $state cimserver - $CIMMOF -n $NAMESPACE $* + regfiles=$* + +#produce sfcb registraion + for rf in $regfiles + do + cat $rf | grep -v '^[[:space:]]*#.*' | while read CLASSNAME NAMESPACE PROVIDERNAME PROVIDERMODULE CAPS + do + chatter "Registering class" $CLASSNAME + cat >> $OUTFILE <<EOFC +[$CLASSNAME] + provider: $PROVIDERNAME + location: $PROVIDERMODULE + type: $CAPS + namespace: $NAMESPACE +# +EOFC + done + done } -function sfcb_install() +function sfcb_rebuild() { - if test $1 == mofs + if ps -C sfcbd > /dev/null 2>&1 then - action="Staging Schemas" - shift - params="$*" - else if test $1 == regs + # sfcb is running -- need to restart + for INITSCRIPT in /etc/init.d/sfcb /usr/local/etc/init.d/sfcb none + do + if test -x $INITSCRIPT + then + break; + fi + done + chatter "Shutting down sfcb." + if test $INITSCRIPT == none + then + killall sfcbd + else + $INITSCRIPT stop + fi + t=0 + while ps -C sfcbd > /dev/null 2>&1 + do + sleep 1 + t=`expr $t + 1` + if test $t > 10 + then + echo "Timed out waiting for sfcb shutdown..." >&2 + echo "Please stop sfcb manually and rebuild the repository using sfcbrepos." >&2 + return 1 + fi + done + chatter "Rebuilding repository." + sfcbrepos -f + if test $? != 0 + then + echo "Repository rebuild failed." >&2 + return 1 + fi + + if test $INITSCRIPT == none + then + echo "No init script found - you need to start sfcbd manually." >&2 + return 1 + else + chatter "Restarting sfcb." + $INITSCRIPT start + fi + else + # Not running - rebuild repository + chatter "Rebuilding repository." + sfcbrepos -f + fi +} + +function sfcb_install() +{ + mymofs= + mregs= + mofmode=1 + while test x$1 != x + do + if test $1 == ":" + then + mofmode=0 + shift + baseregname=`basename -$1 .registration` + continue + fi + if test $mofmode == 1 + then + mymofs="$mymofs $1" + else + myregs="$myregs $1" + fi + shift + done + + for _TEMPDIR in /var/tmp /tmp + do + if test -w $_TEMPDIR + then + _REGFILENAME=$_TEMPDIR/$baseregname.reg + break + fi + done + + trap "rm -f $_REGFILENAME" EXIT + + if sfcb_transform $_REGFILENAME $myregs then - action="Staging Provider Registration -- rebuild repository and restart sfcb!" - shift - params="-r $*" + chatter "Staging provider registration." + sfcbstage -r $_REGFILENAME $mymofs + if test $? != 0 + then + echo "Failed to stage provider registration." >&2 + return 1 + fi + sfcb_rebuild else - echo "Invalid install mode " $1 + echo "Failed to build sfcb registration file." >&2 return 1 fi - fi +} + +function sfcb_uninstall() +{ + mymofs= + while test x$1 != x + do + if test $1 == ":" + then + shift + baseregname=`basename -$1 .registration` + break + fi + mymofs="$mymofs `basename $1`" + shift + done - echo $action - sfcbstage $params + # "Unstage" MOFs and the registration file + chatter "Unstaging provider regsiatrations." + sfcbunstage -r $baseregname.reg $mymofs + + # Rebuild repository + sfcb_rebuild +} + +function cim_server() +{ + for exname in sfcbd cimserver owcimomd + do + if pegasus_path $exname > /dev/null + then + case $exname in + sfcbd) echo sfcb; return 0;; + cimserver) echo pegasus; return 0;; + owcimomd) echo openwbem; return 0;; + esac + break; + fi + done + echo unknown + return 1 } function usage() { - echo "usage: $0 [-h] -t <cimserver> [ -s mof ... | -r regfile ... ]" + echo "usage: $0 [-h] [-v] [-d] [-t <cimserver>] -r regfile ... -m mof ..." +} + +function chatter() +{ + if test x$verbose != x + then + echo $* + fi +} + +function gb_getopt() +{ + rmode=0 + mmode=0 + options= + moffiles= + registrations= + while [ -n "$1" ] + do + case $1 in + -r) mmode=0; + rmode=1; + shift;; + -m) mmode=1; + rmode=0; + shift;; + -*) mmode=0; + rmode=0; + options="$options $1"; + shift;; + **) if [ $mmode == 1 ] + then moffiles="$moffiles $1" + elif [ $rmode == 1 ] + then registrations="$registrations -r $1" + else options="$options $1"; + fi; + shift;; + esac + done + echo $options $registrations $moffiles } -args=`getopt ht:r:s: $*` + +prepargs=`gb_getopt $*` +args=`getopt dvht:r: $prepargs` if [ $? != 0 ] then @@ -89,11 +502,13 @@ -h) help=1; shift; break;; + -v) verbose=1; + shift;; + -d) deregister=1; + shift;; -t) cimserver=$2; shift 2;; - -s) mofs=$2; - shift 2;; - -r) regs=$2; + -r) regs="$regs $2"; shift 2;; --) shift; break;; @@ -101,53 +516,56 @@ esac done +mofs=$* + if [ "$help" == "1" ] then usage echo -e "\t-h display help message" + echo -e "\t-v verbose mode" + echo -e "\t-d deregister provider and uninstall schema" echo -e "\t-t specify cimserver type (pegasus|sfcb|openwbem|sniacimom)" - echo -e "\t-s specify schema mofs" echo -e "\t-r specify registration files" + echo -e "\t-m specify schema mof files" echo - echo Use this command install schema mofs or register provider - echo CIM Server Type is required, schema and registration files are - echo mutually exclusive. + echo Use this command to install schema mofs and register providers. + echo CIM Server Type is required as well as at least one registration file and one mof. exit 0 fi -if test x$cimserver == x -then - usage $0 - exit 1 -fi - -if test x"$mofs" == x && test x"$regs" == x +if test x"$mofs" == x || test x"$regs" == x then usage $0 exit 1 fi -if test x"$mofs" != x && test x"$regs" != x +if test x$cimserver == x then - usage $0 - exit 1 + cimserver=`cim_server` + if test $? == 0 + then + chatter "Autoselected CIM server type:" $cimserver + else + echo "CIM server type could not be determined, specify with -t." >&2 + exit 1 + fi fi -if test x"$mofs" != x -then - mode=mofs - mofs="$mofs $*" -else if test x"$regs" != x +if test x$deregister == x then - mode=regs - regs="$regs $*" -fi -fi - -case $cimserver in - pegasus) pegasus_install $mode $mofs $regs;; - sfcb) sfcb_install $mode $mofs $regs;; - openwbem) echo openwbem not yet supported && exit 1 ;; - sniacimom) echo sniacimom not yet supported && exit 1 ;; - **) echo "Invalid CIM Server Type " $cimserver && exit 1;; -esac + case $cimserver in + pegasus) pegasus_install $mofs ":" $regs;; + sfcb) sfcb_install $mofs ":" $regs;; + openwbem) echo openwbem not yet supported && exit 1 ;; + sniacimom) echo sniacimom not yet supported && exit 1 ;; + **) echo "Invalid CIM Server Type " $cimserver && exit 1;; + esac +else + case $cimserver in + pegasus) pegasus_uninstall $mofs ":" $regs;; + sfcb) sfcb_uninstall $mofs ":" $regs;; + openwbem) echo openwbem not yet supported && exit 1 ;; + sniacimom) echo sniacimom not yet supported && exit 1 ;; + **) echo "Invalid CIM Server Type " $cimserver && exit 1;; + esac +fi Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/cmpi-fsvol/ChangeLog,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ChangeLog 20 Apr 2005 11:40:19 -0000 1.2 +++ ChangeLog 2 May 2005 15:50:07 -0000 1.3 @@ -1,4 +1,12 @@ +2005-05-02 <mih...@dy...> + + * mof/Linux_Fsvol.registration: New registration file format. + + * sblim-cmpi-fsvol.spec.in: Added uninstall support + of new provider-register.sh. + * Makefile.am: Changed to new provider-register.sh invokation + syntax. // =================================================================== // new in version 1.2.4 : |
From: Viktor M. <mih...@us...> - 2005-05-02 15:50:19
|
Update of /cvsroot/sblim/cmpi-fsvol/mof In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28234/mof Added Files: Linux_Fsvol.registration Log Message: Updated to current provider register/deregister template. --- NEW FILE: Linux_Fsvol.registration --- # Classname Namespace ProviderName ProviderModule ProviderTypes ... Linux_Ext2FileSystem root/cimv2 OSBase_LocalFileSystemProvider cmpiOSBase_LocalFileSystemProvider instance Linux_Ext3FileSystem root/cimv2 OSBase_LocalFileSystemProvider cmpiOSBase_LocalFileSystemProvider instance Linux_ReiserFileSystem root/cimv2 OSBase_LocalFileSystemProvider cmpiOSBase_LocalFileSystemProvider instance Linux_NFS root/cimv2 OSBase_NFSProvider cmpiOSBase_NFSProvider instance Linux_HostedFileSystem root/cimv2 OSBase_HostedFileSystemProvider cmpiOSBase_HostedFileSystemProvider instance association Linux_BootOSFromFS root/cimv2 OSBase_BootOSFromFSProvider cmpiOSBase_BootOSFromFSProvider instance association Linux_CSProcessor root/cimv2 OSBase_CSProcessorProvider cmpiOSBase_CSProcessorProvider instance association |
From: Viktor M. <mih...@us...> - 2005-05-02 14:07:05
|
Update of /cvsroot/sblim/wbemcli In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2468 Modified Files: ChangeLog CimCurl.cpp configure.ac Log Message: Bug 1193798: suppressed the Expect: header. Furter, corrected the libcurl version checks and added debugging support via CURLDEBUG environment variable. Index: CimCurl.cpp =================================================================== RCS file: /cvsroot/sblim/wbemcli/CimCurl.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- CimCurl.cpp 9 Dec 2004 17:48:57 -0000 1.3 +++ CimCurl.cpp 2 May 2005 14:06:53 -0000 1.4 @@ -12,6 +12,8 @@ * * Author: Philip K. Warren <pk...@us...> * + * Contributors: Viktor Mihajlovski <mih...@de...> + * * Description: Line command interface to DMTF conforming WBEM servers */ @@ -24,11 +26,12 @@ "Content-type: application/xml; charset=\"utf-8\"", "Connection: Keep-Alive, TE", "CIMProtocolVersion: 1.0", - "CIMOperation: MethodCall" + "CIMOperation: MethodCall", + "Expect:" }; #define NUM_HEADERS ((sizeof(headers))/(sizeof(headers[0]))) -#if LIBCURL_VERSION_NUM >= 0x071000 +#if LIBCURL_VERSION_NUM >= 0x070a00 static const curl_version_info_data *version = curl_version_info(CURLVERSION_NOW); #endif @@ -59,7 +62,7 @@ bool CimomCurl::supportsSSL() { -#if LIBCURL_VERSION_NUM >= 0x071000 +#if LIBCURL_VERSION_NUM >= 0x070a00 if (version && (version->features & CURL_VERSION_SSL)) return true; @@ -168,15 +171,18 @@ // Fail if we receive an error (HTTP response code >= 300) rv = curl_easy_setopt(mHandle, CURLOPT_FAILONERROR, 1); - // Turn this on to enable debugging - // rv = curl_easy_setopt(mHandle, CURLOPT_VERBOSE, 1); + char * curldebug = getenv("CURLDEBUG"); + if (curldebug && strcasecmp(curldebug,"false")) { + // Turn this on to enable debugging + rv = curl_easy_setopt(mHandle, CURLOPT_VERBOSE, 1); + } } static string getErrorMessage(CURLcode err) { string error; -#if LIBCURL_VERSION_NUM >= 0x071200 - error = curl_easy_strerror(rv); +#if LIBCURL_VERSION_NUM >= 0x070c00 + error = curl_easy_strerror(err); #else error = "CURL error: "; error += err; Index: configure.ac =================================================================== RCS file: /cvsroot/sblim/wbemcli/configure.ac,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- configure.ac 5 Apr 2005 12:11:19 -0000 1.7 +++ configure.ac 2 May 2005 14:06:57 -0000 1.8 @@ -1,7 +1,7 @@ # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. -AC_INIT(SBLIM WBEMCLI, 1.4.8c, sbl...@ww...) +AC_INIT(SBLIM WBEMCLI, 1.4.9, sbl...@ww...) AC_CONFIG_SRCDIR([CimXml.cpp]) AC_CANONICAL_HOST Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/wbemcli/ChangeLog,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ChangeLog 14 Oct 2004 16:19:29 -0000 1.1 +++ ChangeLog 2 May 2005 14:06:52 -0000 1.2 @@ -1,4 +1,6 @@ -Refer to CVS log for actual changes. - +2005-05-02 <mih...@dy...> + * CimCurl.cpp: Suppress Expected Header as this slows down the + communication with CIM Servers not supporting it. + Fixed the libcurl version checks to use real hex digits. |
From: Gareth S B. <bes...@us...> - 2005-05-02 01:35:48
|
Update of /cvsroot/sblim/sfcb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5835 Removed Files: authorizationEnum.c authorizationLexer.l authorizationParser.y authorizationProvider.c authorizationUtil.c authorizationUtil.h Log Message: http://sourceforge.net/tracker/index.php?func=detail&aid=1193565&group_id=128809&atid=712784 --- authorizationUtil.c DELETED --- --- authorizationParser.y DELETED --- --- authorizationProvider.c DELETED --- --- authorizationLexer.l DELETED --- --- authorizationUtil.h DELETED --- --- authorizationEnum.c DELETED --- |
From: Gareth S B. <bes...@us...> - 2005-05-02 01:35:17
|
Update of /cvsroot/sblim/sfcb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5655 Modified Files: Makefile.am Log Message: http://sourceforge.net/tracker/index.php?func=detail&aid=1193565&group_id=128809&atid=712784 Index: Makefile.am =================================================================== RCS file: /cvsroot/sblim/sfcb/Makefile.am,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- Makefile.am 27 Apr 2005 17:48:29 -0000 1.18 +++ Makefile.am 2 May 2005 01:35:06 -0000 1.19 @@ -26,8 +26,7 @@ sfcbdocdir=$(datadir)/doc/sfcb-$(VERSION) initdir=$(sysconfdir)/init.d -BUILT_SOURCES=queryParser.c queryLexer.c authorizationParser.c \ - authorizationLexer.c +BUILT_SOURCES=queryParser.c queryLexer.c AM_YFLAGS=-d @@ -41,7 +40,6 @@ libsfcInternalProvider.la \ libsfcInteropProvider.la \ libsfcClassProvider.la \ - libsfcAuthorizationProvider.la \ libsfcCimXmlCodec.la \ libsfcHttpAdapter.la \ libsfcBasicAuthentication.la \ @@ -124,19 +122,6 @@ classProvider.c libsfcClassProvider_la_LIBADD=-lsfcBrokerCore -libsfcAuthorizationProvider_la_SOURCES = \ - authorizationProvider.c \ - authorizationUtil.c \ - authorizationParser.y \ - authorizationLexer.l -libsfcAuthorizationProvider_la_LIBADD=-lsfcBrokerCore - -authorizationLexer.c: authorizationLexer.l authorizationParser.y - lex -t authorizationLexer.l | sed -e "s/yy/sfcAuthyy/g" > authorizationLexer.c - -authorizationParser.c: authorizationLexer.l authorizationParser.y - yacc -p sfcAuthyy -d -o authorizationParser.c authorizationParser.y - libsfcCimXmlCodec_la_SOURCES = \ cimXmlOps.y \ cimXmlParser.c \ @@ -153,7 +138,7 @@ cimXmlRequest.h genericlist.h objectImpl.h trace.h \ hashtable.h utilft.h mlog.h \ cmpidt.h cmpift.h cmpiftx.h cmpimacs.h cmpimacsx.h cmpios.h fileRepository.h \ - selectexp.h queryOperation.h authorizationUtil.h authorizationEnum.c \ + selectexp.h queryOperation.h \ sfcVersion.h mrwlock.h |
From: Adrian S. <a3s...@us...> - 2005-04-29 12:48:47
|
Update of /cvsroot/sblim/sfcb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21280 Modified Files: providerDrv.c Log Message: eronously removed two line from providerDvr.c Index: providerDrv.c =================================================================== RCS file: /cvsroot/sblim/sfcb/providerDrv.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- providerDrv.c 29 Apr 2005 11:35:31 -0000 1.12 +++ providerDrv.c 29 Apr 2005 12:48:30 -0000 1.13 @@ -735,6 +735,8 @@ _SFCB_ENTER(TRACE_PROVIDERDRV, "getClass"); + char *cn=CMGetClassName(path,NULL)->hdl; + char *ns=CMGetNameSpace(path,NULL)->hdl; _SFCB_TRACE(1, ("--- Namespace %s ClassName %s",ns,cn)); if (req->flags & FL_localOnly) flgs|=CMPI_FLAG_LocalOnly; |
From: Adrian S. <a3s...@us...> - 2005-04-29 11:35:41
|
Update of /cvsroot/sblim/sfcb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13515 Modified Files: classProvider.c providerDrv.c providerRegister.c sfcBroker.c utilft.h Log Message: Fixing Viktor's hang problem. ProviderInfo entries related to a terminating process reset. Index: utilft.h =================================================================== RCS file: /cvsroot/sblim/sfcb/utilft.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- utilft.h 9 Mar 2005 12:25:14 -0000 1.1.1.1 +++ utilft.h 29 Apr 2005 11:35:31 -0000 1.2 @@ -170,6 +170,8 @@ void (*removeProvider) (ProviderRegister * br, const char *clsName); ProviderInfo *(*locateProvider) (ProviderRegister * br, const char *provName); + int (*resetProvider) (ProviderRegister * br, + int pid); }; extern Provider_Register_FT *ProviderRegisterFT; Index: providerRegister.c =================================================================== RCS file: /cvsroot/sblim/sfcb/providerRegister.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- providerRegister.c 26 Apr 2005 21:58:47 -0000 1.7 +++ providerRegister.c 29 Apr 2005 11:35:31 -0000 1.8 @@ -243,6 +243,20 @@ return NULL; } +static void resetProvider(ProviderRegister * br, int pid) +{ + ProviderBase *bb = (ProviderBase *) br->hdl; + HashTableIterator *it; + char *key = NULL; + ProviderInfo *info = NULL; + + for (it = bb->ht->ft->getFirst(bb->ht, (void **) &key, (void **) &info); + key && it && info; + it = bb->ht->ft->getNext(bb->ht, it, (void **) &key, (void **) &info)) { + if (info->pid==pid) info->pid=0; + } +} + static void removeProvider(ProviderRegister * br, const char *clsName) { ProviderBase *bb = (ProviderBase *) br->hdl; @@ -256,7 +270,8 @@ getProvider, putProvider, removeProvider, - locateProvider + locateProvider, + resetProvider }; Provider_Register_FT *ProviderRegisterFT = &ift; Index: sfcBroker.c =================================================================== RCS file: /cvsroot/sblim/sfcb/sfcBroker.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- sfcBroker.c 28 Apr 2005 00:18:43 -0000 1.10 +++ sfcBroker.c 29 Apr 2005 11:35:31 -0000 1.11 @@ -223,16 +223,16 @@ for (;;) { pid = wait3(&status, WNOHANG, (struct rusage *) 0); if ((int) pid == 0) - break; + break; if ((int) pid < 0) { if (errno == EINTR || errno == EAGAIN) { // mlogf(M_INFO,M_SHOW, "pid: %d continue \n", pid); continue; } - if (errno != ECHILD) + if (errno != ECHILD) perror("child wait"); break; - } + } else { // mlogf(M_INFO,M_SHOW,"sigchild %d\n",pid); if (testStartedAdapter(pid,&left)) { Index: providerDrv.c =================================================================== RCS file: /cvsroot/sblim/sfcb/providerDrv.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- providerDrv.c 28 Apr 2005 00:18:43 -0000 1.11 +++ providerDrv.c 29 Apr 2005 11:35:31 -0000 1.12 @@ -132,10 +132,7 @@ stopped=1; (pp+i)->pid=0; info=(pp+i)->firstProv; - while (info) { - info->pid=0; - info=info->next; - } + pReg->ft->resetProvider(pReg,pid); } if ((pp+i)->pid!=0) (*left)++; } @@ -433,7 +430,7 @@ semSetValue(sfcbSem,((*proc)->id*3)+provProcInuseId+provProcBaseId,0); semSetValue(sfcbSem,((*proc)->id*3)+provProcAliveId+provProcBaseId,0); semReleaseUnDo(sfcbSem,((*proc)->id*3)+provProcAliveId+provProcBaseId); - semRelease(sfcbSem,((*proc)->id*3)+provProcInuseId+provProcBaseId); + semReleaseUnDo(sfcbSem,((*proc)->id*3)+provProcInuseId+provProcBaseId); semRelease(sfcbSem,((*proc)->id*3)+provProcGuardId+provProcBaseId); processProviderInvocationRequests(info->providerName); @@ -738,8 +735,6 @@ _SFCB_ENTER(TRACE_PROVIDERDRV, "getClass"); - char *cn=CMGetClassName(path,NULL)->hdl; - char *ns=CMGetNameSpace(path,NULL)->hdl; _SFCB_TRACE(1, ("--- Namespace %s ClassName %s",ns,cn)); if (req->flags & FL_localOnly) flgs|=CMPI_FLAG_LocalOnly; Index: classProvider.c =================================================================== RCS file: /cvsroot/sblim/sfcb/classProvider.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- classProvider.c 27 Apr 2005 11:10:41 -0000 1.11 +++ classProvider.c 29 Apr 2005 11:35:31 -0000 1.12 @@ -401,7 +401,7 @@ if (strcmp(de->d_name,".")==0) continue; if (strcmp(de->d_name,"..")==0) continue; l=strlen(dn)+strlen(de->d_name)+4; - n=(char*)malloc(l); + n=(char*)malloc(l+8); strcpy(n,dn); strcat(n,"/"); strcat(n,de->d_name); |
From: Adrian S. <a3s...@us...> - 2005-04-29 11:35:40
|
Update of /cvsroot/sblim/sfcb/regressionTests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13515/regressionTests Modified Files: sfcb.cfg Log Message: Fixing Viktor's hang problem. ProviderInfo entries related to a terminating process reset. Index: sfcb.cfg =================================================================== RCS file: /cvsroot/sblim/sfcb/regressionTests/sfcb.cfg,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- sfcb.cfg 28 Apr 2005 00:18:43 -0000 1.3 +++ sfcb.cfg 29 Apr 2005 11:35:31 -0000 1.4 @@ -11,5 +11,5 @@ sslKeyFilePath: file.pem sslCertificateFilePath: server.pem registrationDir: . -providerSampleInterval: 15 -providerTimeoutInterval: 30 +providerSampleInterval: 5 +providerTimeoutInterval: 10 |
From: Viktor M. <mih...@us...> - 2005-04-28 13:10:09
|
Update of /cvsroot/sblim/cmpi-samples/cmpi-fad In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24083 Modified Files: sblim-cmpi-fad.spec.in Log Message: Fixed typo: removed -t. Index: sblim-cmpi-fad.spec.in =================================================================== RCS file: /cvsroot/sblim/cmpi-samples/cmpi-fad/sblim-cmpi-fad.spec.in,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- sblim-cmpi-fad.spec.in 28 Apr 2005 12:55:42 -0000 1.4 +++ sblim-cmpi-fad.spec.in 28 Apr 2005 13:10:01 -0000 1.5 @@ -70,7 +70,7 @@ %preun # Deregister Schema and Provider - this is higly provider specific -%{_datadir}/%{name}/provider-register.sh -d -t \ +%{_datadir}/%{name}/provider-register.sh -d \ -r %{_datadir}/%{name}/CWS_FAD.registration \ -m %{_datadir}/%{name}/CWS_FAD.mof > /dev/null |
From: Viktor M. <mih...@us...> - 2005-04-28 12:56:06
|
Update of /cvsroot/sblim/cmpi-samples/cmpi-fad In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16800/cmpi-fad Modified Files: sblim-cmpi-fad.spec.in Log Message: Adapted specfile for CIMOM-independence. Index: sblim-cmpi-fad.spec.in =================================================================== RCS file: /cvsroot/sblim/cmpi-samples/cmpi-fad/sblim-cmpi-fad.spec.in,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- sblim-cmpi-fad.spec.in 27 Apr 2005 12:02:56 -0000 1.3 +++ sblim-cmpi-fad.spec.in 28 Apr 2005 12:55:42 -0000 1.4 @@ -9,7 +9,7 @@ Summary: Sample CMPI Provider Name: @PACKAGE_TARNAME@ Version: @PACKAGE_VERSION@ -Release: @CIMSERVER@ +Release: 1 Group: Systems Management/Base License: Common Public License 1.0 @@ -61,7 +61,7 @@ %post # Register Schema and Provider - this is higly provider specific -%{_datadir}/%{name}/provider-register.sh -t @CIMSERVER@ \ +%{_datadir}/%{name}/provider-register.sh \ -r %{_datadir}/%{name}/CWS_FAD.registration \ -m %{_datadir}/%{name}/CWS_FAD.mof > /dev/null @@ -70,7 +70,7 @@ %preun # Deregister Schema and Provider - this is higly provider specific -%{_datadir}/%{name}/provider-register.sh -d -t @CIMSERVER@ \ +%{_datadir}/%{name}/provider-register.sh -d -t \ -r %{_datadir}/%{name}/CWS_FAD.registration \ -m %{_datadir}/%{name}/CWS_FAD.mof > /dev/null |
From: Viktor M. <mih...@us...> - 2005-04-28 12:43:20
|
Update of /cvsroot/sblim/cmpi-samples/autotools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9661/autotools Modified Files: provider-register.sh Log Message: Bug 1191545: provider-register.sh will search for installed CIM servers now if no -t option specified. Index: provider-register.sh =================================================================== RCS file: /cvsroot/sblim/cmpi-samples/autotools/provider-register.sh,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- provider-register.sh 27 Apr 2005 13:28:11 -0000 1.3 +++ provider-register.sh 28 Apr 2005 12:43:10 -0000 1.4 @@ -16,6 +16,7 @@ # registration data for a variety of supported CIMOMs # ================================================================== + function pegasus_path() { for p in /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin \ @@ -38,13 +39,14 @@ PROVIDERMODULES=`cat $regfiles 2> /dev/null | grep -v '^[[:space:]]*#.*' | cut -d ' ' -f 4 | sort | uniq` if test x"$PROVIDERMODULES" == x then - echo Failed to read registration files + echo Failed to read registration files >&2 return 1 fi PROVIDERS=`cat $regfiles 2> /dev/null | grep -v '^[[:space:]]*#.*' | cut -d ' ' -f 3-4 | sort | uniq` # produce ProviderModules echo > $OUTFILE + chatter "Processing provider modules:" $PROVIDERMODULES for pm in $PROVIDERMODULES do cat >> $OUTFILE <<EOFPM @@ -105,7 +107,7 @@ then numcap=5 else numcap="$numcap, 5" fi;; - **) echo unknown provider type $cap + **) echo unknown provider type $cap >&2 return 1;; esac done @@ -182,11 +184,11 @@ if pegasus_transform $_REGFILENAME $myregs then - echo Registering providers with $state cimserver + chatter Registering providers with $state cimserver $CIMMOF -n root/cimv2 $mymofs && $CIMMOF -n root/PG_Interop $_REGFILENAME else - echo "Failed to build pegasus registration MOF." + echo "Failed to build pegasus registration MOF." >&2 return 1 fi } @@ -216,10 +218,9 @@ if ps -C cimserver > /dev/null 2>&1 then PROVIDERMODULES=`cat $myregs 2> /dev/null | grep -v '^[[:space:]]*#.*' | cut -d ' ' -f 4 | sort | uniq` - echo $PROVIDERMODULES if test x"$PROVIDERMODULES" == x then - echo Failed to read registration files + echo Failed to read registration files >&2 return 1 fi CIMPROVIDER=`pegasus_path cimprovider` @@ -230,8 +231,9 @@ fi for pm in $PROVIDERMODULES do - $CIMPROVIDER -d -m $pm && - $CIMPROVIDER -r -m $pm + chatter "Remove provider module" $pm + $CIMPROVIDER -d -m $pm > /dev/null && + $CIMPROVIDER -r -m $pm > /dev/null done WBEMEXEC=`pegasus_path wbemexec` if test $? != 0 @@ -242,7 +244,7 @@ CLASSES=`cat $myregs 2> /dev/null | grep -v '^[[:space:]]*#.*' | cut -d ' ' -f 1` for cls in $CLASSES do - echo Delete CIM Class $cls + chatter Delete CIM Class $cls $WBEMEXEC > /dev/null <<EOFWX <?xml version="1.0" encoding="utf-8" ?> <CIM CIMVERSION="2.0" DTDVERSION="2.0"> @@ -263,7 +265,7 @@ EOFWX done else - echo "Sorry, cimserver must be running to deregister the providers." + echo "Sorry, cimserver must be running to deregister the providers." >&2 return 1 fi } @@ -279,6 +281,7 @@ do cat $rf | grep -v '^[[:space:]]*#.*' | while read CLASSNAME NAMESPACE PROVIDERNAME PROVIDERMODULE CAPS do + chatter "Registering class" $CLASSNAME cat >> $OUTFILE <<EOFC [$CLASSNAME] provider: $PROVIDERNAME @@ -303,7 +306,7 @@ break; fi done - echo "Shutting down sfcb." + chatter "Shutting down sfcb." if test $INITSCRIPT == none then killall sfcbd @@ -317,30 +320,30 @@ t=`expr $t + 1` if test $t > 10 then - echo "Timed out waiting for sfcb shutdown..." - echo "Please stop sfcb manually and rebuild the repository using sfcbrepos." + echo "Timed out waiting for sfcb shutdown..." >&2 + echo "Please stop sfcb manually and rebuild the repository using sfcbrepos." >&2 return 1 fi done - echo "Rebuilding repository." + chatter "Rebuilding repository." sfcbrepos -f if test $? != 0 then - echo "Repository rebuild failed." + echo "Repository rebuild failed." >&2 return 1 fi if test $INITSCRIPT == none then - echo "No init script found - you need to start sfcbd manually." + echo "No init script found - you need to start sfcbd manually." >&2 return 1 else - echo "Restarting sfcb." + chatter "Restarting sfcb." $INITSCRIPT start fi else # Not running - rebuild repository - echo "Rebuilding repository." + chatter "Rebuilding repository." sfcbrepos -f fi } @@ -381,16 +384,16 @@ if sfcb_transform $_REGFILENAME $myregs then - echo "Staging provider registration." + chatter "Staging provider registration." sfcbstage -r $_REGFILENAME $mymofs if test $? != 0 then - echo "Failed to stage provider registration." + echo "Failed to stage provider registration." >&2 return 1 fi sfcb_rebuild else - echo "Failed to build sfcb registration file." + echo "Failed to build sfcb registration file." >&2 return 1 fi } @@ -411,15 +414,42 @@ done # "Unstage" MOFs and the registration file + chatter "Unstaging provider regsiatrations." sfcbunstage -r $baseregname.reg $mymofs # Rebuild repository sfcb_rebuild } +function cim_server() +{ + for exname in sfcbd cimserver owcimomd + do + if pegasus_path $exname > /dev/null + then + case $exname in + sfcbd) echo sfcb; return 0;; + cimserver) echo pegasus; return 0;; + owcimomd) echo openwbem; return 0;; + esac + break; + fi + done + echo unknown + return 1 +} + function usage() { - echo "usage: $0 [-h] [-d] -t <cimserver> -r regfile ... -m mof ..." + echo "usage: $0 [-h] [-v] [-d] [-t <cimserver>] -r regfile ... -m mof ..." +} + +function chatter() +{ + if test x$verbose != x + then + echo $* + fi } function gb_getopt() @@ -456,7 +486,7 @@ prepargs=`gb_getopt $*` -args=`getopt dht:r: $prepargs` +args=`getopt dvht:r: $prepargs` if [ $? != 0 ] then @@ -472,6 +502,8 @@ -h) help=1; shift; break;; + -v) verbose=1; + shift;; -d) deregister=1; shift;; -t) cimserver=$2; @@ -490,28 +522,35 @@ then usage echo -e "\t-h display help message" + echo -e "\t-v verbose mode" echo -e "\t-d deregister provider and uninstall schema" echo -e "\t-t specify cimserver type (pegasus|sfcb|openwbem|sniacimom)" - echo -e "\t-r specify registration file - this option can be multiply specified" + echo -e "\t-r specify registration files" + echo -e "\t-m specify schema mof files" echo echo Use this command to install schema mofs and register providers. echo CIM Server Type is required as well as at least one registration file and one mof. exit 0 fi -if test x$cimserver == x +if test x"$mofs" == x || test x"$regs" == x then usage $0 exit 1 fi -if test x"$mofs" == x || test x"$regs" == x +if test x$cimserver == x then - usage $0 - exit 1 + cimserver=`cim_server` + if test $? == 0 + then + chatter "Autoselected CIM server type:" $cimserver + else + echo "CIM server type could not be determined, specify with -t." >&2 + exit 1 + fi fi - if test x$deregister == x then case $cimserver in |
From: Viktor M. <mih...@us...> - 2005-04-28 12:43:20
|
Update of /cvsroot/sblim/cmpi-samples/cmpi-fad In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9661/cmpi-fad Modified Files: provider-register.sh Log Message: Bug 1191545: provider-register.sh will search for installed CIM servers now if no -t option specified. Index: provider-register.sh =================================================================== RCS file: /cvsroot/sblim/cmpi-samples/cmpi-fad/provider-register.sh,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- provider-register.sh 27 Apr 2005 13:28:12 -0000 1.4 +++ provider-register.sh 28 Apr 2005 12:43:10 -0000 1.5 @@ -16,6 +16,7 @@ # registration data for a variety of supported CIMOMs # ================================================================== + function pegasus_path() { for p in /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin \ @@ -38,13 +39,14 @@ PROVIDERMODULES=`cat $regfiles 2> /dev/null | grep -v '^[[:space:]]*#.*' | cut -d ' ' -f 4 | sort | uniq` if test x"$PROVIDERMODULES" == x then - echo Failed to read registration files + echo Failed to read registration files >&2 return 1 fi PROVIDERS=`cat $regfiles 2> /dev/null | grep -v '^[[:space:]]*#.*' | cut -d ' ' -f 3-4 | sort | uniq` # produce ProviderModules echo > $OUTFILE + chatter "Processing provider modules:" $PROVIDERMODULES for pm in $PROVIDERMODULES do cat >> $OUTFILE <<EOFPM @@ -105,7 +107,7 @@ then numcap=5 else numcap="$numcap, 5" fi;; - **) echo unknown provider type $cap + **) echo unknown provider type $cap >&2 return 1;; esac done @@ -182,11 +184,11 @@ if pegasus_transform $_REGFILENAME $myregs then - echo Registering providers with $state cimserver + chatter Registering providers with $state cimserver $CIMMOF -n root/cimv2 $mymofs && $CIMMOF -n root/PG_Interop $_REGFILENAME else - echo "Failed to build pegasus registration MOF." + echo "Failed to build pegasus registration MOF." >&2 return 1 fi } @@ -216,10 +218,9 @@ if ps -C cimserver > /dev/null 2>&1 then PROVIDERMODULES=`cat $myregs 2> /dev/null | grep -v '^[[:space:]]*#.*' | cut -d ' ' -f 4 | sort | uniq` - echo $PROVIDERMODULES if test x"$PROVIDERMODULES" == x then - echo Failed to read registration files + echo Failed to read registration files >&2 return 1 fi CIMPROVIDER=`pegasus_path cimprovider` @@ -230,8 +231,9 @@ fi for pm in $PROVIDERMODULES do - $CIMPROVIDER -d -m $pm && - $CIMPROVIDER -r -m $pm + chatter "Remove provider module" $pm + $CIMPROVIDER -d -m $pm > /dev/null && + $CIMPROVIDER -r -m $pm > /dev/null done WBEMEXEC=`pegasus_path wbemexec` if test $? != 0 @@ -242,7 +244,7 @@ CLASSES=`cat $myregs 2> /dev/null | grep -v '^[[:space:]]*#.*' | cut -d ' ' -f 1` for cls in $CLASSES do - echo Delete CIM Class $cls + chatter Delete CIM Class $cls $WBEMEXEC > /dev/null <<EOFWX <?xml version="1.0" encoding="utf-8" ?> <CIM CIMVERSION="2.0" DTDVERSION="2.0"> @@ -263,7 +265,7 @@ EOFWX done else - echo "Sorry, cimserver must be running to deregister the providers." + echo "Sorry, cimserver must be running to deregister the providers." >&2 return 1 fi } @@ -279,6 +281,7 @@ do cat $rf | grep -v '^[[:space:]]*#.*' | while read CLASSNAME NAMESPACE PROVIDERNAME PROVIDERMODULE CAPS do + chatter "Registering class" $CLASSNAME cat >> $OUTFILE <<EOFC [$CLASSNAME] provider: $PROVIDERNAME @@ -303,7 +306,7 @@ break; fi done - echo "Shutting down sfcb." + chatter "Shutting down sfcb." if test $INITSCRIPT == none then killall sfcbd @@ -317,30 +320,30 @@ t=`expr $t + 1` if test $t > 10 then - echo "Timed out waiting for sfcb shutdown..." - echo "Please stop sfcb manually and rebuild the repository using sfcbrepos." + echo "Timed out waiting for sfcb shutdown..." >&2 + echo "Please stop sfcb manually and rebuild the repository using sfcbrepos." >&2 return 1 fi done - echo "Rebuilding repository." + chatter "Rebuilding repository." sfcbrepos -f if test $? != 0 then - echo "Repository rebuild failed." + echo "Repository rebuild failed." >&2 return 1 fi if test $INITSCRIPT == none then - echo "No init script found - you need to start sfcbd manually." + echo "No init script found - you need to start sfcbd manually." >&2 return 1 else - echo "Restarting sfcb." + chatter "Restarting sfcb." $INITSCRIPT start fi else # Not running - rebuild repository - echo "Rebuilding repository." + chatter "Rebuilding repository." sfcbrepos -f fi } @@ -381,16 +384,16 @@ if sfcb_transform $_REGFILENAME $myregs then - echo "Staging provider registration." + chatter "Staging provider registration." sfcbstage -r $_REGFILENAME $mymofs if test $? != 0 then - echo "Failed to stage provider registration." + echo "Failed to stage provider registration." >&2 return 1 fi sfcb_rebuild else - echo "Failed to build sfcb registration file." + echo "Failed to build sfcb registration file." >&2 return 1 fi } @@ -411,15 +414,42 @@ done # "Unstage" MOFs and the registration file + chatter "Unstaging provider regsiatrations." sfcbunstage -r $baseregname.reg $mymofs # Rebuild repository sfcb_rebuild } +function cim_server() +{ + for exname in sfcbd cimserver owcimomd + do + if pegasus_path $exname > /dev/null + then + case $exname in + sfcbd) echo sfcb; return 0;; + cimserver) echo pegasus; return 0;; + owcimomd) echo openwbem; return 0;; + esac + break; + fi + done + echo unknown + return 1 +} + function usage() { - echo "usage: $0 [-h] [-d] -t <cimserver> -r regfile ... -m mof ..." + echo "usage: $0 [-h] [-v] [-d] [-t <cimserver>] -r regfile ... -m mof ..." +} + +function chatter() +{ + if test x$verbose != x + then + echo $* + fi } function gb_getopt() @@ -456,7 +486,7 @@ prepargs=`gb_getopt $*` -args=`getopt dht:r: $prepargs` +args=`getopt dvht:r: $prepargs` if [ $? != 0 ] then @@ -472,6 +502,8 @@ -h) help=1; shift; break;; + -v) verbose=1; + shift;; -d) deregister=1; shift;; -t) cimserver=$2; @@ -490,28 +522,35 @@ then usage echo -e "\t-h display help message" + echo -e "\t-v verbose mode" echo -e "\t-d deregister provider and uninstall schema" echo -e "\t-t specify cimserver type (pegasus|sfcb|openwbem|sniacimom)" - echo -e "\t-r specify registration file - this option can be multiply specified" + echo -e "\t-r specify registration files" + echo -e "\t-m specify schema mof files" echo echo Use this command to install schema mofs and register providers. echo CIM Server Type is required as well as at least one registration file and one mof. exit 0 fi -if test x$cimserver == x +if test x"$mofs" == x || test x"$regs" == x then usage $0 exit 1 fi -if test x"$mofs" == x || test x"$regs" == x +if test x$cimserver == x then - usage $0 - exit 1 + cimserver=`cim_server` + if test $? == 0 + then + chatter "Autoselected CIM server type:" $cimserver + else + echo "CIM server type could not be determined, specify with -t." >&2 + exit 1 + fi fi - if test x$deregister == x then case $cimserver in |
From: Viktor M. <mih...@us...> - 2005-04-28 12:36:57
|
Update of /cvsroot/sblim/cmpi-base In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5247 Modified Files: provider-register.sh sblim-cmpi-base.spec.in Log Message: Bug 1191544: Added CIMOM autodetection to provider-register.sh and changed spec to be CIMOM agnostic. Index: sblim-cmpi-base.spec.in =================================================================== RCS file: /cvsroot/sblim/cmpi-base/sblim-cmpi-base.spec.in,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- sblim-cmpi-base.spec.in 27 Apr 2005 11:06:27 -0000 1.5 +++ sblim-cmpi-base.spec.in 28 Apr 2005 12:36:48 -0000 1.6 @@ -9,7 +9,7 @@ Summary: Sample CMPI Provider Name: @PACKAGE_TARNAME@ Version: @PACKAGE_VERSION@ -Release: @CIMSERVER@ +Release: 1 Group: Systems Management/Base License: Common Public License 1.0 @@ -48,7 +48,7 @@ %build -%configure TESTSUITEDIR=%{_datadir}/sblim-testsuite CIMSERVER=@CIMSERVER@ +%configure TESTSUITEDIR=%{_datadir}/sblim-testsuite make %clean @@ -84,14 +84,14 @@ %define REGISTRATION %{_datadir}/%{name}/Linux_Base.registration %endif -%{_datadir}/%{name}/provider-register.sh -t @CIMSERVER@ \ +%{_datadir}/%{name}/provider-register.sh \ -r %{REGISTRATION} -m %{SCHEMA} > /dev/null /sbin/ldconfig %preun -%{_datadir}/%{name}/provider-register.sh -d -t @CIMSERVER@ \ +%{_datadir}/%{name}/provider-register.sh -d \ -r %{REGISTRATION} -m %{SCHEMA} > /dev/null %postun Index: provider-register.sh =================================================================== RCS file: /cvsroot/sblim/cmpi-base/provider-register.sh,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- provider-register.sh 27 Apr 2005 13:05:37 -0000 1.5 +++ provider-register.sh 28 Apr 2005 12:36:48 -0000 1.6 @@ -16,6 +16,7 @@ # registration data for a variety of supported CIMOMs # ================================================================== + function pegasus_path() { for p in /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin \ @@ -38,13 +39,14 @@ PROVIDERMODULES=`cat $regfiles 2> /dev/null | grep -v '^[[:space:]]*#.*' | cut -d ' ' -f 4 | sort | uniq` if test x"$PROVIDERMODULES" == x then - echo Failed to read registration files + echo Failed to read registration files >&2 return 1 fi PROVIDERS=`cat $regfiles 2> /dev/null | grep -v '^[[:space:]]*#.*' | cut -d ' ' -f 3-4 | sort | uniq` # produce ProviderModules echo > $OUTFILE + chatter "Processing provider modules:" $PROVIDERMODULES for pm in $PROVIDERMODULES do cat >> $OUTFILE <<EOFPM @@ -105,7 +107,7 @@ then numcap=5 else numcap="$numcap, 5" fi;; - **) echo unknown provider type $cap + **) echo unknown provider type $cap >&2 return 1;; esac done @@ -182,11 +184,11 @@ if pegasus_transform $_REGFILENAME $myregs then - echo Registering providers with $state cimserver + chatter Registering providers with $state cimserver $CIMMOF -n root/cimv2 $mymofs && $CIMMOF -n root/PG_Interop $_REGFILENAME else - echo "Failed to build pegasus registration MOF." + echo "Failed to build pegasus registration MOF." >&2 return 1 fi } @@ -216,10 +218,9 @@ if ps -C cimserver > /dev/null 2>&1 then PROVIDERMODULES=`cat $myregs 2> /dev/null | grep -v '^[[:space:]]*#.*' | cut -d ' ' -f 4 | sort | uniq` - echo $PROVIDERMODULES if test x"$PROVIDERMODULES" == x then - echo Failed to read registration files + echo Failed to read registration files >&2 return 1 fi CIMPROVIDER=`pegasus_path cimprovider` @@ -230,8 +231,9 @@ fi for pm in $PROVIDERMODULES do - $CIMPROVIDER -d -m $pm && - $CIMPROVIDER -r -m $pm + chatter "Remove provider module" $pm + $CIMPROVIDER -d -m $pm > /dev/null && + $CIMPROVIDER -r -m $pm > /dev/null done WBEMEXEC=`pegasus_path wbemexec` if test $? != 0 @@ -242,7 +244,7 @@ CLASSES=`cat $myregs 2> /dev/null | grep -v '^[[:space:]]*#.*' | cut -d ' ' -f 1` for cls in $CLASSES do - echo Delete CIM Class $cls + chatter Delete CIM Class $cls $WBEMEXEC > /dev/null <<EOFWX <?xml version="1.0" encoding="utf-8" ?> <CIM CIMVERSION="2.0" DTDVERSION="2.0"> @@ -263,7 +265,7 @@ EOFWX done else - echo "Sorry, cimserver must be running to deregister the providers." + echo "Sorry, cimserver must be running to deregister the providers." >&2 return 1 fi } @@ -279,6 +281,7 @@ do cat $rf | grep -v '^[[:space:]]*#.*' | while read CLASSNAME NAMESPACE PROVIDERNAME PROVIDERMODULE CAPS do + chatter "Registering class" $CLASSNAME cat >> $OUTFILE <<EOFC [$CLASSNAME] provider: $PROVIDERNAME @@ -303,7 +306,7 @@ break; fi done - echo "Shutting down sfcb." + chatter "Shutting down sfcb." if test $INITSCRIPT == none then killall sfcbd @@ -317,30 +320,30 @@ t=`expr $t + 1` if test $t > 10 then - echo "Timed out waiting for sfcb shutdown..." - echo "Please stop sfcb manually and rebuild the repository using sfcbrepos." + echo "Timed out waiting for sfcb shutdown..." >&2 + echo "Please stop sfcb manually and rebuild the repository using sfcbrepos." >&2 return 1 fi done - echo "Rebuilding repository." + chatter "Rebuilding repository." sfcbrepos -f if test $? != 0 then - echo "Repository rebuild failed." + echo "Repository rebuild failed." >&2 return 1 fi if test $INITSCRIPT == none then - echo "No init script found - you need to start sfcbd manually." + echo "No init script found - you need to start sfcbd manually." >&2 return 1 else - echo "Restarting sfcb." + chatter "Restarting sfcb." $INITSCRIPT start fi else # Not running - rebuild repository - echo "Rebuilding repository." + chatter "Rebuilding repository." sfcbrepos -f fi } @@ -381,16 +384,16 @@ if sfcb_transform $_REGFILENAME $myregs then - echo "Staging provider registration." + chatter "Staging provider registration." sfcbstage -r $_REGFILENAME $mymofs if test $? != 0 then - echo "Failed to stage provider registration." + echo "Failed to stage provider registration." >&2 return 1 fi sfcb_rebuild else - echo "Failed to build sfcb registration file." + echo "Failed to build sfcb registration file." >&2 return 1 fi } @@ -411,15 +414,42 @@ done # "Unstage" MOFs and the registration file + chatter "Unstaging provider regsiatrations." sfcbunstage -r $baseregname.reg $mymofs # Rebuild repository sfcb_rebuild } +function cim_server() +{ + for exname in sfcbd cimserver owcimomd + do + if pegasus_path $exname > /dev/null + then + case $exname in + sfcbd) echo sfcb; return 0;; + cimserver) echo pegasus; return 0;; + owcimomd) echo openwbem; return 0;; + esac + break; + fi + done + echo unknown + return 1 +} + function usage() { - echo "usage: $0 [-h] [-d] -t <cimserver> -r regfile ... -m mof ..." + echo "usage: $0 [-h] [-v] [-d] [-t <cimserver>] -r regfile ... -m mof ..." +} + +function chatter() +{ + if test x$verbose != x + then + echo $* + fi } function gb_getopt() @@ -456,7 +486,7 @@ prepargs=`gb_getopt $*` -args=`getopt dht:r: $prepargs` +args=`getopt dvht:r: $prepargs` if [ $? != 0 ] then @@ -472,6 +502,8 @@ -h) help=1; shift; break;; + -v) verbose=1; + shift;; -d) deregister=1; shift;; -t) cimserver=$2; @@ -490,28 +522,35 @@ then usage echo -e "\t-h display help message" + echo -e "\t-v verbose mode" echo -e "\t-d deregister provider and uninstall schema" echo -e "\t-t specify cimserver type (pegasus|sfcb|openwbem|sniacimom)" - echo -e "\t-r specify registration file - this option can be multiply specified" + echo -e "\t-r specify registration files" + echo -e "\t-m specify schema mof files" echo echo Use this command to install schema mofs and register providers. echo CIM Server Type is required as well as at least one registration file and one mof. exit 0 fi -if test x$cimserver == x +if test x"$mofs" == x || test x"$regs" == x then usage $0 exit 1 fi -if test x"$mofs" == x || test x"$regs" == x +if test x$cimserver == x then - usage $0 - exit 1 + cimserver=`cim_server` + if test $? == 0 + then + chatter "Autoselected CIM server type:" $cimserver + else + echo "CIM server type could not be determined, specify with -t." >&2 + exit 1 + fi fi - if test x$deregister == x then case $cimserver in |
From: Adrian S. <a3s...@us...> - 2005-04-28 00:18:52
|
Update of /cvsroot/sblim/sfcb/regressionTests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv575/regressionTests Modified Files: sfcb.cfg Log Message: Fix for hang problem reported by Viktor Index: sfcb.cfg =================================================================== RCS file: /cvsroot/sblim/sfcb/regressionTests/sfcb.cfg,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- sfcb.cfg 11 Mar 2005 12:22:35 -0000 1.2 +++ sfcb.cfg 28 Apr 2005 00:18:43 -0000 1.3 @@ -11,3 +11,5 @@ sslKeyFilePath: file.pem sslCertificateFilePath: server.pem registrationDir: . +providerSampleInterval: 15 +providerTimeoutInterval: 30 |
From: Adrian S. <a3s...@us...> - 2005-04-28 00:18:52
|
Update of /cvsroot/sblim/sfcb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv575 Modified Files: msgqueue.c providerDrv.c sfcBroker.c Log Message: Fix for hang problem reported by Viktor Index: sfcBroker.c =================================================================== RCS file: /cvsroot/sblim/sfcb/sfcBroker.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- sfcBroker.c 26 Apr 2005 21:58:47 -0000 1.9 +++ sfcBroker.c 28 Apr 2005 00:18:43 -0000 1.10 @@ -235,7 +235,7 @@ } else { // mlogf(M_INFO,M_SHOW,"sigchild %d\n",pid); - if (testStartedAdapter(pid,&left)) { + if (testStartedAdapter(pid,&left)) { if (left==0) { mlogf(M_INFO,M_SHOW,"--- Adapters stopped\n"); adaptersStopped=1; Index: providerDrv.c =================================================================== RCS file: /cvsroot/sblim/sfcb/providerDrv.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- providerDrv.c 27 Apr 2005 11:10:42 -0000 1.10 +++ providerDrv.c 28 Apr 2005 00:18:43 -0000 1.11 @@ -123,6 +123,7 @@ int testStartedProc(int pid, int *left) { ProviderProcess *pp=provProc; + ProviderInfo *info; int i,stopped=0; *left=0; @@ -130,6 +131,11 @@ if ((pp+i)->pid==pid) { stopped=1; (pp+i)->pid=0; + info=(pp+i)->firstProv; + while (info) { + info->pid=0; + info=info->next; + } } if ((pp+i)->pid!=0) (*left)++; } @@ -421,6 +427,7 @@ getInode(providerSockets.receive))); processName=info->providerName; providerProcess=1; + info->proc=*proc; semSetValue(sfcbSem,((*proc)->id*3)+provProcGuardId+provProcBaseId,0); semSetValue(sfcbSem,((*proc)->id*3)+provProcInuseId+provProcBaseId,0); @@ -451,11 +458,12 @@ _SFCB_ENTER(TRACE_PROVIDERDRV, "forkProvider"); ProviderProcess *proc; ProviderInfo * pInfo; + int val; if (info->pid ) { proc=info->proc; semAcquire(sfcbSem,(proc->id*3)+provProcGuardId+provProcBaseId); - if (semGetValue(sfcbSem,(proc->id*3)+provProcAliveId+provProcBaseId)) { + if ((val=semGetValue(sfcbSem,(proc->id*3)+provProcAliveId+provProcBaseId))) { semRelease(sfcbSem,(proc->id*3)+provProcInuseId+provProcBaseId); semRelease(sfcbSem,(proc->id*3)+provProcGuardId+provProcBaseId); _SFCB_TRACE(1, ("--- Provider %s still loaded",info->providerName)); @@ -1823,7 +1831,7 @@ mlogf(M_INFO,M_SHOW,"--- Reloading provider\n"); doLoadProvider(pInfo,dlName); } - + if (pInfo->initialized==0) { pthread_mutex_lock(&pInfo->initMtx); if (pInfo->initialized==0) { Index: msgqueue.c =================================================================== RCS file: /cvsroot/sblim/sfcb/msgqueue.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- msgqueue.c 26 Apr 2005 21:58:47 -0000 1.5 +++ msgqueue.c 28 Apr 2005 00:18:43 -0000 1.6 @@ -181,7 +181,7 @@ ol = length; for (;;) { if (mqg) mqg->teintr=0; - if ((n = recv(*s, data+r, length-r, 0)) < 0) { + if ((n = recv(*s, data+r, length-r, MSG_WAITALL)) < 0) { if (errno == EINTR) { _SFCB_TRACE(1, (" Receive interrupted %d",currentProc)); if (mqg) { |
From: Viktor M. <mih...@us...> - 2005-04-27 17:48:40
|
Update of /cvsroot/sblim/sfcb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10995 Modified Files: Makefile.am sfcb.spec.in sfcbrepos.sh.in Log Message: Oner more shot at renaming: uses sfcb instead of sblim-sfcb for all install directories. Index: sfcb.spec.in =================================================================== RCS file: /cvsroot/sblim/sfcb/sfcb.spec.in,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- sfcb.spec.in 27 Apr 2005 11:53:13 -0000 1.9 +++ sfcb.spec.in 27 Apr 2005 17:48:29 -0000 1.10 @@ -57,7 +57,7 @@ echo "%defattr(-,root,root)" > _pkg_list -find $RPM_BUILD_ROOT/%{_datadir}/%{name} -type f | grep -v $RPM_BUILD_ROOT/%{_datadir}/%{name}/CIM >> _pkg_list +find $RPM_BUILD_ROOT/%{_datadir}/sfcb -type f | grep -v $RPM_BUILD_ROOT/%{_datadir}/sfcb/CIM >> _pkg_list sed s?$RPM_BUILD_ROOT??g _pkg_list > _pkg_list_2 mv -f _pkg_list_2 _pkg_list echo "%config %{_sysconfdir}/sfcb" >> _pkg_list @@ -89,6 +89,6 @@ exit 0 %files schema -%{_datadir}/%{name}/CIM +%{_datadir}/sfcb/CIM %files -f _pkg_list Index: Makefile.am =================================================================== RCS file: /cvsroot/sblim/sfcb/Makefile.am,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- Makefile.am 27 Apr 2005 17:09:56 -0000 1.17 +++ Makefile.am 27 Apr 2005 17:48:29 -0000 1.18 @@ -20,9 +20,10 @@ # # +sfcbdatadir=$(datadir)/sfcb sfcbconfdir=$(sysconfdir)/sfcb sfcbstatedir=$(localstatedir)/lib/sfcb -sfcbdocdir=$(datadir)/doc/$(PACKAGE)-$(VERSION) +sfcbdocdir=$(datadir)/doc/sfcb-$(VERSION) initdir=$(sysconfdir)/init.d BUILT_SOURCES=queryParser.c queryLexer.c authorizationParser.c \ @@ -163,9 +164,9 @@ sfcbconf_DATA=sfcb.cfg -dist_pkgdata_SCRIPTS=genSslCert.sh getSchema.sh +dist_sfcbdata_SCRIPTS=genSslCert.sh getSchema.sh -dist_pkgdata_DATA=default.reg +dist_sfcbdata_DATA=default.reg nodist_bin_SCRIPTS=sfcbrepos sfcbstage sfcbunstage @@ -220,15 +221,15 @@ -rmdir $(sfcbdocdir) clean-local: - rm -f sfcbrepos sfcbstage sfcbunstage sfcb.cfg getSchema.sh sfcb.init \ + rm -f sfcbrepos sfcbstage sfcbunstage sfcb.cfg getSchema.sh sfcb \ sfcb.init-redhat sfcb.init-suse sfcb.init-none dist-hook: test -d "$(distdir)" && rm -rf `find $(distdir) -type d -name CVS` install-cimschema: getSchema.sh - test -d $(DESTDIR)$(pkgdatadir) || $(mkdir_p) $(DESTDIR)$(pkgdatadir) - sh getSchema.sh -f $(DESTDIR)$(pkgdatadir) + test -d $(DESTDIR)$(sfcbdatadir) || $(mkdir_p) $(DESTDIR)$(sfcbdatadir) + sh getSchema.sh -f $(DESTDIR)$(sfcbdatadir) postinstall: install-cimschema test -f $(DESTDIR)$(sfcbstatedir)/registration/providerRegister || $(INSTALL_DATA) $(DESTDIR)$(sfcbstatedir)/stage/default.reg $(DESTDIR)$(sfcbstatedir)/registration/providerRegister Index: sfcbrepos.sh.in =================================================================== RCS file: /cvsroot/sblim/sfcb/sfcbrepos.sh.in,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- sfcbrepos.sh.in 27 Apr 2005 11:53:13 -0000 1.7 +++ sfcbrepos.sh.in 27 Apr 2005 17:48:29 -0000 1.8 @@ -42,7 +42,7 @@ echo -e "\t-f force repository creation" echo -e "\t-s specify staging directory [@localstatedir@/lib/sfcb/stage]" echo -e "\t-r specify repository directory [@localstatedir@/lib/sfcb/registration]" - echo -e "\t-c specify directory containing CIM Schema MOFs [@datadir@/@PACKAGE@/CIM]" + echo -e "\t-c specify directory containing CIM Schema MOFs [@datadir@/sfcb/CIM]" echo echo "Use to create sfcb provider registration and class repository." exit 0 @@ -75,7 +75,7 @@ if [ -z "$cimschemadir" ] then - cimschemadir=@datadir@/@PACKAGE@/CIM + cimschemadir=@datadir@/sfcb/CIM fi if [ -d $stagingdir ] && [ -f $stagingdir/default.reg ] && |
From: Viktor M. <mih...@us...> - 2005-04-27 17:10:05
|
Update of /cvsroot/sblim/sfcb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21612 Modified Files: Makefile.am Log Message: Still on the package renaming issue: changed the explicit install and uninstall operations to use the standard xxxdir mechanism. Index: Makefile.am =================================================================== RCS file: /cvsroot/sblim/sfcb/Makefile.am,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- Makefile.am 27 Apr 2005 11:53:13 -0000 1.16 +++ Makefile.am 27 Apr 2005 17:09:56 -0000 1.17 @@ -20,6 +20,7 @@ # # +sfcbconfdir=$(sysconfdir)/sfcb sfcbstatedir=$(localstatedir)/lib/sfcb sfcbdocdir=$(datadir)/doc/$(PACKAGE)-$(VERSION) initdir=$(sysconfdir)/init.d @@ -29,7 +30,7 @@ AM_YFLAGS=-d -AM_CPPFLAGS=-DSFCB_CONFDIR=\"$(sysconfdir)/sfcb\" \ +AM_CPPFLAGS=-DSFCB_CONFDIR=\"$(sfcbconfdir)\" \ -DSFCB_STATEDIR=\"$(sfcbstatedir)\" SUBDIRS=. $(MOFC_DIR) @@ -160,6 +161,8 @@ sfcb.init-none.in \ regressionTests doc +sfcbconf_DATA=sfcb.cfg + dist_pkgdata_SCRIPTS=genSslCert.sh getSchema.sh dist_pkgdata_DATA=default.reg @@ -168,6 +171,8 @@ dist_bin_SCRIPTS=wbemcat +init_SCRIPTS=sfcb + sfcbrepos: sfcbrepos.sh sed -e s?$$\{prefix\}?$(prefix)?g \ -e s?$$\{exec_prefix\}?$(prefix)?g $< > $@ @@ -188,7 +193,7 @@ sed -e s?$$\{prefix\}?$(prefix)?g \ -e s?$$\{exec_prefix\}?$(prefix)?g $< > $@ -sfcb.init: sfcb.$(INIT_STYLE) +sfcb: sfcb.$(INIT_STYLE) sed -e s?$$\{prefix\}?$(prefix)?g \ -e s?$$\{exec_prefix\}?$(prefix)?g $< > $@ @@ -198,9 +203,7 @@ unittest: cd test && sh check_all.sh -install-data-local: sfcb.cfg - test -d $(DESTDIR)$(sysconfdir)/sfcb || $(mkdir_p) $(DESTDIR)$(sysconfdir)/sfcb - $(INSTALL_DATA) sfcb.cfg $(DESTDIR)$(sysconfdir)/sfcb +install-data-local: test -d $(DESTDIR)$(sfcbstatedir)/registration/repository || $(mkdir_p) $(DESTDIR)$(sfcbstatedir)/registration/repository test -d $(DESTDIR)$(sfcbstatedir)/stage/mofs || $(mkdir_p) $(DESTDIR)$(sfcbstatedir)/stage/mofs test -d $(DESTDIR)$(sfcbstatedir)/stage/regs || $(mkdir_p) $(DESTDIR)$(sfcbstatedir)/stage/regs @@ -209,20 +212,16 @@ $(INSTALL_DATA) $(srcdir)/README $(srcdir)/AUTHORS $(srcdir)/COPYING $(DESTDIR)$(sfcbdocdir) $(INSTALL_DATA) $(srcdir)/doc/sfcb.html $(DESTDIR)$(sfcbdocdir) -install-exec-local:sfcb.init - test -d $(DESTDIR)$(initdir) || $(mkdir_p) $(DESTDIR)$(initdir) - $(INSTALL_SCRIPT) sfcb.init $(DESTDIR)$(initdir)/sfcb - uninstall-local: rm -f $(DESTDIR)$(sysconfdir)/sfcb/sfcb.cfg rm -f $(DESTDIR)$(sfcbstatedir)/stage/default.reg rm -f $(DESTDIR)$(sfcbdocdir)/* - rm -f $(DESTDIR)$(initdir)/sfcb -rmdir $(sysconfdir)/sfcb -rmdir $(sfcbdocdir) clean-local: - rm -f sfcbrepos sfcbstage sfcbunstage sfcb.cfg getSchema.sh sfcb.init + rm -f sfcbrepos sfcbstage sfcbunstage sfcb.cfg getSchema.sh sfcb.init \ + sfcb.init-redhat sfcb.init-suse sfcb.init-none dist-hook: test -d "$(distdir)" && rm -rf `find $(distdir) -type d -name CVS` |
From: Viktor M. <mih...@us...> - 2005-04-27 13:28:22
|
Update of /cvsroot/sblim/cmpi-samples/cmpi-fad In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11404/cmpi-fad Modified Files: provider-register.sh Log Message: Bug 1190981: fix for local Pegasus installs. Index: provider-register.sh =================================================================== RCS file: /cvsroot/sblim/cmpi-samples/cmpi-fad/provider-register.sh,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- provider-register.sh 27 Apr 2005 12:02:56 -0000 1.3 +++ provider-register.sh 27 Apr 2005 13:28:12 -0000 1.4 @@ -19,7 +19,7 @@ function pegasus_path() { for p in /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin \ - /opt/tog-pegasus/bin /opt/tog-pegasus/sbin + /opt/tog-pegasus/bin /opt/tog-pegasus/sbin $PEGASUS_HOME/bin do if test -x $p/$1 then |
From: Viktor M. <mih...@us...> - 2005-04-27 13:28:21
|
Update of /cvsroot/sblim/cmpi-samples/autotools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11404/autotools Modified Files: provider-register.sh Log Message: Bug 1190981: fix for local Pegasus installs. Index: provider-register.sh =================================================================== RCS file: /cvsroot/sblim/cmpi-samples/autotools/provider-register.sh,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- provider-register.sh 27 Apr 2005 12:03:54 -0000 1.2 +++ provider-register.sh 27 Apr 2005 13:28:11 -0000 1.3 @@ -19,7 +19,7 @@ function pegasus_path() { for p in /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin \ - /opt/tog-pegasus/bin /opt/tog-pegasus/sbin + /opt/tog-pegasus/bin /opt/tog-pegasus/sbin $PEGASUS_HOME/bin do if test -x $p/$1 then |
From: Viktor M. <mih...@us...> - 2005-04-27 13:06:19
|
Update of /cvsroot/sblim/cmpi-base In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1261 Modified Files: provider-register.sh Log Message: Bug 1190981: support for $PEGASUS_HOME/bin added. Index: provider-register.sh =================================================================== RCS file: /cvsroot/sblim/cmpi-base/provider-register.sh,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- provider-register.sh 27 Apr 2005 09:13:45 -0000 1.4 +++ provider-register.sh 27 Apr 2005 13:05:37 -0000 1.5 @@ -19,7 +19,7 @@ function pegasus_path() { for p in /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin \ - /opt/tog-pegasus/bin /opt/tog-pegasus/sbin + /opt/tog-pegasus/bin /opt/tog-pegasus/sbin $PEGASUS_HOME/bin do if test -x $p/$1 then |
From: Viktor M. <mih...@us...> - 2005-04-27 12:04:03
|
Update of /cvsroot/sblim/cmpi-samples/autotools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv894/autotools Modified Files: HOWTO.autoconfiscate provider-register.sh Log Message: Updated provider-rgister.sh. Index: HOWTO.autoconfiscate =================================================================== RCS file: /cvsroot/sblim/cmpi-samples/autotools/HOWTO.autoconfiscate,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- HOWTO.autoconfiscate 19 Apr 2005 09:00:37 -0000 1.1 +++ HOWTO.autoconfiscate 27 Apr 2005 12:03:54 -0000 1.2 @@ -42,7 +42,7 @@ - configure.ac - Makefile.am - <packagename>.spec.in -for provider packages add provider-install.sh (from this directory) +for provider packages add provider-register.sh (from this directory) 3. Tailor configure.ac to your purposes You may use cmpi-base or cmpi-fsvol as an example. Specifically you Index: provider-register.sh =================================================================== RCS file: /cvsroot/sblim/cmpi-samples/autotools/provider-register.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- provider-register.sh 19 Apr 2005 09:00:37 -0000 1.1 +++ provider-register.sh 27 Apr 2005 12:03:54 -0000 1.2 @@ -12,68 +12,451 @@ # # Author: Viktor Mihajlovski <mih...@de...> # Contributors: -# Description: Script to install class definitions (MOFs) and registration data -# for a variety of supported CIMOMs +# Description: Script to install class definitions (MOFs) and +# registration data for a variety of supported CIMOMs # ================================================================== +function pegasus_path() +{ + for p in /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin \ + /opt/tog-pegasus/bin /opt/tog-pegasus/sbin + do + if test -x $p/$1 + then + echo $p/$1 + return 0 + fi + done + return 1 +} + +function pegasus_transform() +{ + OUTFILE=$1 + shift + regfiles=$* + PROVIDERMODULES=`cat $regfiles 2> /dev/null | grep -v '^[[:space:]]*#.*' | cut -d ' ' -f 4 | sort | uniq` + if test x"$PROVIDERMODULES" == x + then + echo Failed to read registration files + return 1 + fi + PROVIDERS=`cat $regfiles 2> /dev/null | grep -v '^[[:space:]]*#.*' | cut -d ' ' -f 3-4 | sort | uniq` + +# produce ProviderModules + echo > $OUTFILE + for pm in $PROVIDERMODULES + do + cat >> $OUTFILE <<EOFPM +instance of PG_ProviderModule +{ + Name = "$pm"; + Location = "$pm"; + Vendor = "SBLIM"; + Version = "2.0.0"; + InterfaceType = "CMPI"; + InterfaceVersion = "2.0.0"; +}; + +EOFPM + done + +# produce Providers + set -- $PROVIDERS + while test x$1 != x + do + cat >> $OUTFILE <<EOFP +instance of PG_Provider +{ + Name = "$1"; + ProviderModuleName = "$2"; +}; + +EOFP + shift 2 + done + +#produce Capabilities + for rf in $regfiles + do + cat $rf | grep -v '^[[:space:]]*#.*' | while read CLASSNAME NAMESPACE PROVIDERNAME PROVIDERMODULE CAPS + do + numcap= + for cap in $CAPS + do + case $cap in + instance) + if test x$numcap == x + then numcap=2 + else numcap="$numcap, 2" + fi;; + association) + if test x$numcap == x + then numcap=3 + else numcap="$numcap, 3" + fi;; + indication) + if test x$numcap == x + then numcap=4 + else numcap="$numcap, 4" + fi;; + method) + if test x$numcap == x + then numcap=5 + else numcap="$numcap, 5" + fi;; + **) echo unknown provider type $cap + return 1;; + esac + done + cat >> $OUTFILE <<EOFC +instance of PG_ProviderCapabilities +{ + ProviderModuleName = "$PROVIDERMODULE"; + ProviderName = "$PROVIDERNAME"; + ClassName = "$CLASSNAME"; + ProviderType = { $numcap }; + Namespaces = {"$NAMESPACE"}; + SupportedProperties = NULL; + SupportedMethods = NULL; + CapabilityID = "1"; +}; + +EOFC + done + done +} + function pegasus_install() { if ps -C cimserver > /dev/null 2>&1 then - CIMMOF=cimmof + CIMMOF=`pegasus_path cimmof` + if test $? != 0 + then + echo "Error: cimmof not found" >&2 + return 1 + fi state=active else - CIMMOF=cimmofl + CIMMOF=`pegasus_path cimmofl` + if test $? != 0 + then + echo "Error: cimmof not found" >&2 + return 1 + fi state=inactive fi + + mymofs= + mregs= + mofmode=1 + while test x$1 != x + do + if test $1 == ":" + then + mofmode=0 + shift + continue + fi + if test $mofmode == 1 + then + mymofs="$mymofs $1" + else + myregs="$myregs $1" + fi + shift + done + + for _TEMPDIR in /var/tmp /tmp + do + if test -w $_TEMPDIR + then + _REGFILENAME=$_TEMPDIR/$$.mof + break + fi + done + - if test $1 == mofs - then - NAMESPACE=root/cimv2 - action="Installing Schemas" - else if test $1 == regs + trap "rm -f $_REGFILENAME" EXIT + + if pegasus_transform $_REGFILENAME $myregs then - NAMESPACE=root/PG_Interop - action="Registering Providers" + echo Registering providers with $state cimserver + $CIMMOF -n root/cimv2 $mymofs && + $CIMMOF -n root/PG_Interop $_REGFILENAME else - echo "Invalid install mode " $1 + echo "Failed to build pegasus registration MOF." return 1 fi +} + +function pegasus_uninstall() +{ + mymofs= + mregs= + mofmode=1 + while test x$1 != x + do + if test $1 == ":" + then + mofmode=0 + shift + continue + fi + if test $mofmode == 1 + then + mymofs="$mymofs $1" + else + myregs="$myregs $1" + fi + shift + done + + if ps -C cimserver > /dev/null 2>&1 + then + PROVIDERMODULES=`cat $myregs 2> /dev/null | grep -v '^[[:space:]]*#.*' | cut -d ' ' -f 4 | sort | uniq` + echo $PROVIDERMODULES + if test x"$PROVIDERMODULES" == x + then + echo Failed to read registration files + return 1 + fi + CIMPROVIDER=`pegasus_path cimprovider` + if test $? != 0 + then + echo "Error: cimprovider not found" >&2 + return 1 + fi + for pm in $PROVIDERMODULES + do + $CIMPROVIDER -d -m $pm && + $CIMPROVIDER -r -m $pm + done + WBEMEXEC=`pegasus_path wbemexec` + if test $? != 0 + then + echo "Error: wbemexec not found" >&2 + return 1 + fi + CLASSES=`cat $myregs 2> /dev/null | grep -v '^[[:space:]]*#.*' | cut -d ' ' -f 1` + for cls in $CLASSES + do + echo Delete CIM Class $cls + $WBEMEXEC > /dev/null <<EOFWX +<?xml version="1.0" encoding="utf-8" ?> +<CIM CIMVERSION="2.0" DTDVERSION="2.0"> + <MESSAGE ID="4711" PROTOCOLVERSION="1.0"> + <SIMPLEREQ> + <IMETHODCALL NAME="DeleteClass"> + <LOCALNAMESPACEPATH> + <NAMESPACE NAME="root"></NAMESPACE> + <NAMESPACE NAME="cimv2"></NAMESPACE> + </LOCALNAMESPACEPATH> + <IPARAMVALUE NAME="ClassName"> + <CLASSNAME NAME="$cls"/> + </IPARAMVALUE> + </IMETHODCALL> + </SIMPLEREQ> + </MESSAGE> +</CIM> +EOFWX + done + else + echo "Sorry, cimserver must be running to deregister the providers." + return 1 fi +} +function sfcb_transform() +{ + OUTFILE=$1 shift - echo $action with $state cimserver - $CIMMOF -n $NAMESPACE $* + regfiles=$* + +#produce sfcb registraion + for rf in $regfiles + do + cat $rf | grep -v '^[[:space:]]*#.*' | while read CLASSNAME NAMESPACE PROVIDERNAME PROVIDERMODULE CAPS + do + cat >> $OUTFILE <<EOFC +[$CLASSNAME] + provider: $PROVIDERNAME + location: $PROVIDERMODULE + type: $CAPS + namespace: $NAMESPACE +# +EOFC + done + done } -function sfcb_install() +function sfcb_rebuild() { - if test $1 == mofs + if ps -C sfcbd > /dev/null 2>&1 then - action="Staging Schemas" - shift - params="$*" - else if test $1 == regs + # sfcb is running -- need to restart + for INITSCRIPT in /etc/init.d/sfcb /usr/local/etc/init.d/sfcb none + do + if test -x $INITSCRIPT + then + break; + fi + done + echo "Shutting down sfcb." + if test $INITSCRIPT == none + then + killall sfcbd + else + $INITSCRIPT stop + fi + t=0 + while ps -C sfcbd > /dev/null 2>&1 + do + sleep 1 + t=`expr $t + 1` + if test $t > 10 + then + echo "Timed out waiting for sfcb shutdown..." + echo "Please stop sfcb manually and rebuild the repository using sfcbrepos." + return 1 + fi + done + echo "Rebuilding repository." + sfcbrepos -f + if test $? != 0 + then + echo "Repository rebuild failed." + return 1 + fi + + if test $INITSCRIPT == none + then + echo "No init script found - you need to start sfcbd manually." + return 1 + else + echo "Restarting sfcb." + $INITSCRIPT start + fi + else + # Not running - rebuild repository + echo "Rebuilding repository." + sfcbrepos -f + fi +} + +function sfcb_install() +{ + mymofs= + mregs= + mofmode=1 + while test x$1 != x + do + if test $1 == ":" + then + mofmode=0 + shift + baseregname=`basename -$1 .registration` + continue + fi + if test $mofmode == 1 + then + mymofs="$mymofs $1" + else + myregs="$myregs $1" + fi + shift + done + + for _TEMPDIR in /var/tmp /tmp + do + if test -w $_TEMPDIR + then + _REGFILENAME=$_TEMPDIR/$baseregname.reg + break + fi + done + + trap "rm -f $_REGFILENAME" EXIT + + if sfcb_transform $_REGFILENAME $myregs then - action="Staging Provider Registration -- rebuild repository and restart sfcb!" - shift - params="-r $*" + echo "Staging provider registration." + sfcbstage -r $_REGFILENAME $mymofs + if test $? != 0 + then + echo "Failed to stage provider registration." + return 1 + fi + sfcb_rebuild else - echo "Invalid install mode " $1 + echo "Failed to build sfcb registration file." return 1 fi - fi +} + +function sfcb_uninstall() +{ + mymofs= + while test x$1 != x + do + if test $1 == ":" + then + shift + baseregname=`basename -$1 .registration` + break + fi + mymofs="$mymofs `basename $1`" + shift + done - echo $action - sfcbstage $params + # "Unstage" MOFs and the registration file + sfcbunstage -r $baseregname.reg $mymofs + + # Rebuild repository + sfcb_rebuild } function usage() { - echo "usage: $0 [-h] -t <cimserver> [ -s mof ... | -r regfile ... ]" + echo "usage: $0 [-h] [-d] -t <cimserver> -r regfile ... -m mof ..." } -args=`getopt ht:r:s: $*` +function gb_getopt() +{ + rmode=0 + mmode=0 + options= + moffiles= + registrations= + while [ -n "$1" ] + do + case $1 in + -r) mmode=0; + rmode=1; + shift;; + -m) mmode=1; + rmode=0; + shift;; + -*) mmode=0; + rmode=0; + options="$options $1"; + shift;; + **) if [ $mmode == 1 ] + then moffiles="$moffiles $1" + elif [ $rmode == 1 ] + then registrations="$registrations -r $1" + else options="$options $1"; + fi; + shift;; + esac + done + echo $options $registrations $moffiles +} + + +prepargs=`gb_getopt $*` +args=`getopt dht:r: $prepargs` if [ $? != 0 ] then @@ -89,11 +472,11 @@ -h) help=1; shift; break;; + -d) deregister=1; + shift;; -t) cimserver=$2; shift 2;; - -s) mofs=$2; - shift 2;; - -r) regs=$2; + -r) regs="$regs $2"; shift 2;; --) shift; break;; @@ -101,17 +484,18 @@ esac done +mofs=$* + if [ "$help" == "1" ] then usage echo -e "\t-h display help message" + echo -e "\t-d deregister provider and uninstall schema" echo -e "\t-t specify cimserver type (pegasus|sfcb|openwbem|sniacimom)" - echo -e "\t-s specify schema mofs" - echo -e "\t-r specify registration files" + echo -e "\t-r specify registration file - this option can be multiply specified" echo - echo Use this command install schema mofs or register provider - echo CIM Server Type is required, schema and registration files are - echo mutually exclusive. + echo Use this command to install schema mofs and register providers. + echo CIM Server Type is required as well as at least one registration file and one mof. exit 0 fi @@ -121,33 +505,28 @@ exit 1 fi -if test x"$mofs" == x && test x"$regs" == x +if test x"$mofs" == x || test x"$regs" == x then usage $0 exit 1 fi -if test x"$mofs" != x && test x"$regs" != x -then - usage $0 - exit 1 -fi -if test x"$mofs" != x -then - mode=mofs - mofs="$mofs $*" -else if test x"$regs" != x +if test x$deregister == x then - mode=regs - regs="$regs $*" -fi -fi - -case $cimserver in - pegasus) pegasus_install $mode $mofs $regs;; - sfcb) sfcb_install $mode $mofs $regs;; - openwbem) echo openwbem not yet supported && exit 1 ;; - sniacimom) echo sniacimom not yet supported && exit 1 ;; - **) echo "Invalid CIM Server Type " $cimserver && exit 1;; -esac + case $cimserver in + pegasus) pegasus_install $mofs ":" $regs;; + sfcb) sfcb_install $mofs ":" $regs;; + openwbem) echo openwbem not yet supported && exit 1 ;; + sniacimom) echo sniacimom not yet supported && exit 1 ;; + **) echo "Invalid CIM Server Type " $cimserver && exit 1;; + esac +else + case $cimserver in + pegasus) pegasus_uninstall $mofs ":" $regs;; + sfcb) sfcb_uninstall $mofs ":" $regs;; + openwbem) echo openwbem not yet supported && exit 1 ;; + sniacimom) echo sniacimom not yet supported && exit 1 ;; + **) echo "Invalid CIM Server Type " $cimserver && exit 1;; + esac +fi |
From: Viktor M. <mih...@us...> - 2005-04-27 12:03:05
|
Update of /cvsroot/sblim/cmpi-samples/cmpi-fad In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32691 Modified Files: ChangeLog Makefile.am NEWS acinclude.m4 configure.ac provider-register.sh sblim-cmpi-fad.spec.in Log Message: Upgraded to most current SBLIM autotools status. Index: acinclude.m4 =================================================================== RCS file: /cvsroot/sblim/cmpi-samples/cmpi-fad/acinclude.m4,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- acinclude.m4 14 Apr 2005 15:28:23 -0000 1.4 +++ acinclude.m4 27 Apr 2005 12:02:56 -0000 1.5 @@ -27,7 +27,10 @@ AC_DEFUN([CHECK_PEGASUS_2_3_2], [ AC_MSG_CHECKING(for Pegasus 2.3.2) - test_CIMSERVER=`cimserver -v` + if which cimserver > /dev/null 2>&1 + then + test_CIMSERVER=`cimserver -v` + fi if test "$test_CIMSERVER" == "2.3.2"; then AC_MSG_RESULT(yes) AC_DEFINE_UNQUOTED(HAVE_PEGASUS_2_3_2,1,[Defined to 1 if Pegasus 2.3.2 is used]) @@ -45,7 +48,10 @@ AC_DEFUN([CHECK_PEGASUS_2_4], [ AC_MSG_CHECKING(for Pegasus 2.4) - test_CIMSERVER=`cimserver -v` + if which cimserver > /dev/null 2>&1 + then + test_CIMSERVER=`cimserver -v` + fi if test "$test_CIMSERVER" == "2.4"; then AC_MSG_RESULT(yes) CPPFLAGS="$CPPFLAGS -DPEGASUS_USE_EXPERIMENTAL_INTERFACES" @@ -86,6 +92,29 @@ ]) +AC_DEFUN([_CHECK_INDHELP_HEADER], + [ + AC_MSG_CHECKING($1) + AC_TRY_COMPILE( + [ + #include <stdio.h> + #include <ind_helper.h> + ], + [ + CMPISelectExp *filter = NULL; + ind_set_select("/root/cimv2",NULL,filter); + ], + [ + have_INDHELP=yes + dnl AC_MSG_RESULT(yes) + ], + [ + have_INDHELP=no + dnl AC_MSG_RESULT(no) + ]) + +]) + dnl dnl The main function to check for CMPI headers dnl Modifies the CPPFLAGS with the right include directory and sets @@ -95,8 +124,8 @@ AC_DEFUN([CHECK_CMPI], [ AC_MSG_CHECKING(for CMPI headers) - CMPI_CPP_FLAGS="$CPPFLAGS" dnl Check just with the standard include paths + CMPI_CPP_FLAGS="$CPPFLAGS" _CHECK_CMPI(standard) if test "$have_CMPI" == "yes"; then dnl The standard include paths worked. @@ -133,6 +162,47 @@ ) dnl +dnl The main function to check for the indication_helper header. +dnl Modifies the CPPFLAGS with the right include directory and sets +dnl the 'have_INDHELP' to either 'no' or 'yes' +dnl + +AC_DEFUN([CHECK_INDHELP_HEADER], + [ + INDHELP_CPP_FLAGS="$CPPFLAGS" + AC_MSG_CHECKING(for indication helper header) + dnl Check just with the standard include paths + _CHECK_INDHELP_HEADER(standard) + if test "$have_INDHELP" == "yes"; then + dnl The standard include paths worked. + AC_MSG_RESULT(yes) + else + _DIRS_="/usr/include/sblim \ + /usr/local/include/sblim" + for _DIR_ in $_DIRS_ + do + _cppflags=$CPPFLAGS + _include_INDHELP="$_DIR_" + CPPFLAGS="$CPPFLAGS -I$_include_INDHELP" + _CHECK_INDHELP_HEADER($_DIR_) + if test "$have_INDHELP" == "yes"; then + dnl Found it + AC_MSG_RESULT(yes) + dnl Save the new -I parameter + INDHELP_CPP_FLAGS="$CPPFLAGS" + break + fi + CPPFLAGS=$_cppflags + done + fi + CPPFLAGS="$INDHELP_CPP_FLAGS" + if test "$have_INDHELP" == "no"; then + AC_MSG_RESULT(no) + fi + ] +) + +dnl dnl The check for the CMPI provider directory dnl Sets the PROVIDERDIR variable. dnl @@ -141,10 +211,19 @@ [ AC_MSG_CHECKING(for CMPI provider directory) _DIRS="$libdir/cmpi" + save_exec_prefix=${exec_prefix} + save_prefix=${prefix} + if test xNONE == x${prefix}; then + prefix=/usr/local + fi + if test xNONE == x${exec_prefix}; then + exec_prefix=$prefix + fi for _dir in $_DIRS do + _xdir=`eval echo $_dir` AC_MSG_CHECKING( $_dir ) - if test -d $_dir ; then + if test -d $_xdir ; then dnl Found it AC_MSG_RESULT(yes) if test x"$PROVIDERDIR" == x ; then @@ -157,6 +236,8 @@ PROVIDERDIR="$libdir"/cmpi AC_MSG_RESULT(implied: $PROVIDERDIR) fi + exec_prefix=$save_exec_prefix + prefix=$save_prefix ] ) @@ -193,3 +274,85 @@ ] ) +dnl +dnl The check for the SBLIM test suite +dnl Sets the TESTSUITEDIR variable and the TESTSUITE conditional +dnl + +AC_DEFUN([CHECK_TESTSUITE], + [ + AC_MSG_CHECKING(for SBLIM testsuite) + _DIRS="$datadir/sblim-testsuite" + save_exec_prefix=${exec_prefix} + save_prefix=${prefix} + if test xNONE == x${prefix}; then + prefix=/usr/local + fi + if test xNONE == x${exec_prefix}; then + exec_prefix=$prefix + fi + for _name in $_DIRS + do + AC_MSG_CHECKING( $_name ) + _xname=`eval echo $_name` + if test -x $_xname/run.sh ; then + dnl Found it + AC_MSG_RESULT(yes) + if test x"$TESTSUITEDIR" == x; then + TESTSUITEDIR=$_name + fi + AC_SUBST(TESTSUITEDIR) + break; + fi + done + if test x"$TESTSUITEDIR" == x ; then + AC_MSG_RESULT(no) + fi + AM_CONDITIONAL(TESTSUITE,[test x"$TESTSUITEDIR" != x]) + exec_prefix=$save_exec_prefix + prefix=$save_prefix + ] +) + +dnl +dnl The main function to check for the cmpi-base common header +dnl Modifies the CPPFLAGS with the right include directory and sets +dnl the 'have_SBLIMBASE' to either 'no' or 'yes' +dnl + +AC_DEFUN([CHECK_SBLIM_BASE], + [ + AC_MSG_CHECKING(for SBLIM Base) + SBLIMBASE_CPP_FLAGS="$CPPFLAGS" + dnl Check just with the standard include paths + _CHECK_SBLIM_BASE(standard) + if test "$have_SBLIMBASE" == "yes"; then + dnl The standard include paths worked. + AC_MSG_RESULT(yes) + else + _DIRS_="/usr/include/sblim \ + /usr/local/include/sblim" + for _DIR_ in $_DIRS_ + do + _cppflags=$CPPFLAGS + _include_SBLIMBASE="$_DIR_" + CPPFLAGS="$CPPFLAGS -I$_include_SBLIMBASE" + _CHECK_SBLIM_BASE($_DIR_) + if test "$have_SBLIMBASE" == "yes"; then + dnl Found it + AC_MSG_RESULT(yes) + dnl Save the new -I parameter + SBLIMBASE_CPP_FLAGS="$CPPFLAGS" + LIBSBLIMBASE=-lcmpiOSBase_Common + break + fi + CPPFLAGS=$_cppflags + done + fi + CPPFLAGS=$SBLIMBASE_CPP_FLAGS + AC_SUBST(LIBSBLIMBASE) + if test "$have_SBLIMBASE" == "no"; then + AC_MSG_ERROR(no. The required SBLIM Base package is missing.) + fi + ] +) Index: configure.ac =================================================================== RCS file: /cvsroot/sblim/cmpi-samples/cmpi-fad/configure.ac,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- configure.ac 20 Apr 2005 17:02:41 -0000 1.3 +++ configure.ac 27 Apr 2005 12:02:56 -0000 1.4 @@ -3,7 +3,7 @@ # PUT YOUR PACKAGE INFO HERE. e.g. #AC_INIT(<PACKAGE_NAME>, <PACKAGE_VERSION>, <PACKAGE_BUGREPORT>, <PACKAGE_TARBALL>) -AC_INIT(CMPI Files And Directories, 0.4.0, mih...@de..., sblim-cmpi-fad) +AC_INIT(CMPI Files And Directories, 0.4.1, mih...@de..., sblim-cmpi-fad) # CHANGE THIS TO THE RELATIVE PATHNAME OF *ONE* OF THE SOURCE FILES AC_CONFIG_SRCDIR([src/CWS_Directory.c]) Index: Makefile.am =================================================================== RCS file: /cvsroot/sblim/cmpi-samples/cmpi-fad/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Makefile.am 20 Apr 2005 17:02:38 -0000 1.3 +++ Makefile.am 27 Apr 2005 12:02:56 -0000 1.4 @@ -75,10 +75,10 @@ # Register the provider(s) and class definition(s) to the current CIM server/CIMOM postinstall: - sh provider-register.sh -t @CIMSERVER@ -r $(REGS) $(MOFS) + sh provider-register.sh -t @CIMSERVER@ -r $(REGS) -m $(MOFS) preuninstall: - sh provider-register.sh -d -t @CIMSERVER@ -r $(REGS) $(MOFS) + sh provider-register.sh -d -t @CIMSERVER@ -r $(REGS) -m $(MOFS) # We must explicity add all the schema files to the distribution package pkgdata_DATA=$(MOFS) $(REGS) Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/cmpi-samples/cmpi-fad/ChangeLog,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- ChangeLog 5 Apr 2005 13:20:53 -0000 1.1.1.1 +++ ChangeLog 27 Apr 2005 12:02:56 -0000 1.2 @@ -0,0 +1,9 @@ +2005-04-27 <mih...@dy...> + + * acinclude.m4: use new version from autotools dir + * provider-register.sh: use new version from autotools dir + * Makefile.am: change provider-register.sh invokation + * schema/: remove CIM server specific registration files + * sblim-cmpi-fad.spec.in: better buildroot, adapt to new + provider-register.sh + * configure.ac: bumped release number Index: NEWS =================================================================== RCS file: /cvsroot/sblim/cmpi-samples/cmpi-fad/NEWS,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- NEWS 5 Apr 2005 13:20:53 -0000 1.1.1.1 +++ NEWS 27 Apr 2005 12:02:56 -0000 1.2 @@ -0,0 +1,9 @@ +CMPI Files And Directories Sample Provider +(C) Copyright IBM Corp. 2005 + +Summary of Package Changes and News + +Release 0.4.1 +============= +- Adapted to newest SBLIM autotool changes + If built for sfcb needs sfcb 0.8.8 or higher Index: provider-register.sh =================================================================== RCS file: /cvsroot/sblim/cmpi-samples/cmpi-fad/provider-register.sh,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- provider-register.sh 20 Apr 2005 17:02:41 -0000 1.2 +++ provider-register.sh 27 Apr 2005 12:02:56 -0000 1.3 @@ -16,18 +16,32 @@ # registration data for a variety of supported CIMOMs # ================================================================== +function pegasus_path() +{ + for p in /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin \ + /opt/tog-pegasus/bin /opt/tog-pegasus/sbin + do + if test -x $p/$1 + then + echo $p/$1 + return 0 + fi + done + return 1 +} + function pegasus_transform() { OUTFILE=$1 shift regfiles=$* - PROVIDERMODULES=`cat $regfiles 2> /dev/null | cut -d ' ' -f 4 | sort | uniq` + PROVIDERMODULES=`cat $regfiles 2> /dev/null | grep -v '^[[:space:]]*#.*' | cut -d ' ' -f 4 | sort | uniq` if test x"$PROVIDERMODULES" == x then echo Failed to read registration files return 1 fi - PROVIDERS=`cat $regfiles 2> /dev/null | cut -d ' ' -f 3-4 | sort | uniq` + PROVIDERS=`cat $regfiles 2> /dev/null | grep -v '^[[:space:]]*#.*' | cut -d ' ' -f 3-4 | sort | uniq` # produce ProviderModules echo > $OUTFILE @@ -65,8 +79,7 @@ #produce Capabilities for rf in $regfiles do - echo $rf - while read CLASSNAME NAMESPACE PROVIDERNAME PROVIDERMODULE CAPS + cat $rf | grep -v '^[[:space:]]*#.*' | while read CLASSNAME NAMESPACE PROVIDERNAME PROVIDERMODULE CAPS do numcap= for cap in $CAPS @@ -110,7 +123,7 @@ }; EOFC - done < $rf + done done } @@ -118,10 +131,20 @@ { if ps -C cimserver > /dev/null 2>&1 then - CIMMOF=cimmof + CIMMOF=`pegasus_path cimmof` + if test $? != 0 + then + echo "Error: cimmof not found" >&2 + return 1 + fi state=active else - CIMMOF=cimmofl + CIMMOF=`pegasus_path cimmofl` + if test $? != 0 + then + echo "Error: cimmof not found" >&2 + return 1 + fi state=inactive fi @@ -192,23 +215,52 @@ if ps -C cimserver > /dev/null 2>&1 then - PROVIDERMODULES=`cat $myregs 2> /dev/null | cut -d ' ' -f 4 | sort | uniq` + PROVIDERMODULES=`cat $myregs 2> /dev/null | grep -v '^[[:space:]]*#.*' | cut -d ' ' -f 4 | sort | uniq` echo $PROVIDERMODULES if test x"$PROVIDERMODULES" == x then echo Failed to read registration files return 1 fi + CIMPROVIDER=`pegasus_path cimprovider` + if test $? != 0 + then + echo "Error: cimprovider not found" >&2 + return 1 + fi for pm in $PROVIDERMODULES do - cimprovider -d -m $pm && - cimprovider -r -m $pm + $CIMPROVIDER -d -m $pm && + $CIMPROVIDER -r -m $pm done - CLASSES=`cat $myregs 2> /dev/null | cut -d ' ' -f 1` - echo $classes + WBEMEXEC=`pegasus_path wbemexec` + if test $? != 0 + then + echo "Error: wbemexec not found" >&2 + return 1 + fi + CLASSES=`cat $myregs 2> /dev/null | grep -v '^[[:space:]]*#.*' | cut -d ' ' -f 1` for cls in $CLASSES do - CLI dc $cls + echo Delete CIM Class $cls + $WBEMEXEC > /dev/null <<EOFWX +<?xml version="1.0" encoding="utf-8" ?> +<CIM CIMVERSION="2.0" DTDVERSION="2.0"> + <MESSAGE ID="4711" PROTOCOLVERSION="1.0"> + <SIMPLEREQ> + <IMETHODCALL NAME="DeleteClass"> + <LOCALNAMESPACEPATH> + <NAMESPACE NAME="root"></NAMESPACE> + <NAMESPACE NAME="cimv2"></NAMESPACE> + </LOCALNAMESPACEPATH> + <IPARAMVALUE NAME="ClassName"> + <CLASSNAME NAME="$cls"/> + </IPARAMVALUE> + </IMETHODCALL> + </SIMPLEREQ> + </MESSAGE> +</CIM> +EOFWX done else echo "Sorry, cimserver must be running to deregister the providers." @@ -225,8 +277,7 @@ #produce sfcb registraion for rf in $regfiles do - echo $rf - while read CLASSNAME NAMESPACE PROVIDERNAME PROVIDERMODULE CAPS + cat $rf | grep -v '^[[:space:]]*#.*' | while read CLASSNAME NAMESPACE PROVIDERNAME PROVIDERMODULE CAPS do cat >> $OUTFILE <<EOFC [$CLASSNAME] @@ -236,7 +287,7 @@ namespace: $NAMESPACE # EOFC - done < $rf + done done } @@ -368,10 +419,44 @@ function usage() { - echo "usage: $0 [-h] [-d] -t <cimserver> -r regfile [-r regfile ...] mof ..." + echo "usage: $0 [-h] [-d] -t <cimserver> -r regfile ... -m mof ..." } -args=`getopt dht:r:s: $*` +function gb_getopt() +{ + rmode=0 + mmode=0 + options= + moffiles= + registrations= + while [ -n "$1" ] + do + case $1 in + -r) mmode=0; + rmode=1; + shift;; + -m) mmode=1; + rmode=0; + shift;; + -*) mmode=0; + rmode=0; + options="$options $1"; + shift;; + **) if [ $mmode == 1 ] + then moffiles="$moffiles $1" + elif [ $rmode == 1 ] + then registrations="$registrations -r $1" + else options="$options $1"; + fi; + shift;; + esac + done + echo $options $registrations $moffiles +} + + +prepargs=`gb_getopt $*` +args=`getopt dht:r: $prepargs` if [ $? != 0 ] then Index: sblim-cmpi-fad.spec.in =================================================================== RCS file: /cvsroot/sblim/cmpi-samples/cmpi-fad/sblim-cmpi-fad.spec.in,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- sblim-cmpi-fad.spec.in 20 Apr 2005 17:02:41 -0000 1.2 +++ sblim-cmpi-fad.spec.in 27 Apr 2005 12:02:56 -0000 1.3 @@ -4,7 +4,7 @@ # Package spec for @PACKAGE@ # -BuildRoot: /var/tmp/buildroot +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} Summary: Sample CMPI Provider Name: @PACKAGE_TARNAME@ @@ -63,7 +63,7 @@ %{_datadir}/%{name}/provider-register.sh -t @CIMSERVER@ \ -r %{_datadir}/%{name}/CWS_FAD.registration \ - %{_datadir}/%{name}/CWS_FAD.mof > /dev/null + -m %{_datadir}/%{name}/CWS_FAD.mof > /dev/null /sbin/ldconfig @@ -72,7 +72,7 @@ %{_datadir}/%{name}/provider-register.sh -d -t @CIMSERVER@ \ -r %{_datadir}/%{name}/CWS_FAD.registration \ - %{_datadir}/%{name}/CWS_FAD.mof > /dev/null + -m %{_datadir}/%{name}/CWS_FAD.mof > /dev/null %postun /sbin/ldconfig |
From: Viktor M. <mih...@us...> - 2005-04-27 12:03:04
|
Update of /cvsroot/sblim/cmpi-samples/cmpi-fad/schema In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32691/schema Modified Files: CWS_FAD.registration Removed Files: CWS_FAD.PegasusReg.mof CWS_FAD.sfcb.reg Log Message: Upgraded to most current SBLIM autotools status. Index: CWS_FAD.registration =================================================================== RCS file: /cvsroot/sblim/cmpi-samples/cmpi-fad/schema/CWS_FAD.registration,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- CWS_FAD.registration 20 Apr 2005 17:02:41 -0000 1.1 +++ CWS_FAD.registration 27 Apr 2005 12:02:56 -0000 1.2 @@ -1,3 +1,4 @@ +# Classname Namespace Providername Libraryname Capabilities ... CWS_Directory root/cimv2 CWS_DirectoryProvider CWS_Directory instance CWS_PlainFile root/cimv2 CWS_PlainFileProvider CWS_PlainFile instance method CWS_DirectoryContainsFile root/cimv2 CWS_DirectoryContainsFileProvider CWS_DirectoryContainsFile association --- CWS_FAD.sfcb.reg DELETED --- --- CWS_FAD.PegasusReg.mof DELETED --- |
From: Viktor M. <mih...@us...> - 2005-04-27 11:53:30
|
Update of /cvsroot/sblim/sfcb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26639 Modified Files: Makefile.am configure.ac sfcb.spec.in sfcbrepos.sh.in Added Files: sfcb.init-none.in sfcb.init-redhat.in sfcb.init-suse.in Removed Files: sfcb.init-none sfcb.init-redhat sfcb.init-suse Log Message: Bug 1186414: Additional work was necessary to make the renamed package work. Bug 1190811: Changes to support sfcbd in /usr/sbin. --- NEW FILE: sfcb.init-suse.in --- #!/bin/bash # # $Id: sfcb.init-suse.in,v 1.1 2005/04/27 11:53:13 mihajlov Exp $ # ### BEGIN INIT INFO # Provides: sfcb # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Short-Description: Small Footprint CIM Broker Service # Description: Manage the sfcb Service ### END INIT INFO # Source function library. . /etc/rc.status echo $PATH | grep -q @sbindir@ ||PATH=@sbindir@:$PATH if [ -z "$LD_LIBRARY_PATH" ] || echo $LD_LIBRARY_PATH | grep -qv @libdir@ then LD_LIBRARY_PATH=@libdir@:$LD_LIBRARY_PATH export LD_LIBRARY_PATH fi # Add CMPI directory if [ -z "$LD_LIBRARY_PATH" ] || echo $LD_LIBRARY_PATH | grep -qv @libdir@/cmpi then LD_LIBRARY_PATH=@libdir@/cmpi:$LD_LIBRARY_PATH export LD_LIBRARY_PATH fi start() { echo -n "Starting sfcb: " startproc @sbindir@/sfcbd -d rcstatus -v } stop() { echo -n "Shutting down sfcb: " killproc sfcbd rcstatus -v } reload() { echo -n "Reloading sfcb configuration: " killproc -HUP sfcbd rcstatus -v } case "$1" in start) start ;; stop) stop ;; status) checkproc sfcbd rc_status -v ;; restart) stop start ;; reload) reload ;; condrestart) $0 status if test $? = 0; then $0 restart else rc_reset fi rc_status ;; *) echo "Usage: sfcb {start|stop|status|reload|restart|condrestart}" exit 1 ;; esac exit $? --- NEW FILE: sfcb.init-none.in --- #!/bin/bash # # $Id: sfcb.init-none.in,v 1.1 2005/04/27 11:53:13 mihajlov Exp $ # # Generic System V Init Script echo $PATH | grep -q @sbindir@ ||PATH=@sbindir@:$PATH if [ -z "$LD_LIBRARY_PATH" ] || echo $LD_LIBRARY_PATH | grep -qv @libdir@ then LD_LIBRARY_PATH=@libdir@:$LD_LIBRARY_PATH export LD_LIBRARY_PATH fi # Add CMPI directory if [ -z "$LD_LIBRARY_PATH" ] || echo $LD_LIBRARY_PATH | grep -qv @libdir@/cmpi then LD_LIBRARY_PATH=@libdir@/cmpi:$LD_LIBRARY_PATH export LD_LIBRARY_PATH fi start() { echo -n "Starting sfcb: " @sbindir@/sfcbd -d && echo "done." && return 0 || echo "failed." return 1 } stop() { echo -n "Shutting down sfcb: " killall sfcbd && echo "done." && return 0 || echo "failed." return 1 } reload() { echo -n "Reloading sfcb configuration: " killall -HUP sfcbd && echo "done." && return 0 || echo "failed." return 1 } case "$1" in start) start ;; stop) stop ;; status) echo -n "Checking SFCB status: " ps --noheaders -C sfcbd || echo "stopped." ;; restart) stop start ;; reload) reload ;; *) echo "Usage: sfcb {start|stop|status|reload|restart}" exit 1 ;; esac exit $? --- NEW FILE: sfcb.init-redhat.in --- #!/bin/bash # # $Id: sfcb.init-redhat.in,v 1.1 2005/04/27 11:53:13 mihajlov Exp $ # # chkconfig: 35 20 80 # # description: Small Footprint CIM Broker Service # # processname: sfcbd # # config: @sysconfdir@/sfcb/sfcb.cfg # Source function library. . /etc/init.d/functions echo $PATH | grep -q @sbindir@ ||PATH=@sbindir@:$PATH if [ -z "$LD_LIBRARY_PATH" ] || echo $LD_LIBRARY_PATH | grep -qv @libdir@ then LD_LIBRARY_PATH=@libdir@:$LD_LIBRARY_PATH export LD_LIBRARY_PATH fi # Add CMPI directory if [ -z "$LD_LIBRARY_PATH" ] || echo $LD_LIBRARY_PATH | grep -qv @libdir@/cmpi then LD_LIBRARY_PATH=@libdir@/cmpi:$LD_LIBRARY_PATH export LD_LIBRARY_PATH fi start() { echo -n "Starting sfcb: " daemon @sbindir@/sfcbd -d && touch /var/lock/subsys/sfcb && return 0 || return 1 } stop() { echo -n "Shutting down sfcb: " killproc sfcbd && rm -f /var/lock/subsys/sfcb && return 0 || return 1 } reload() { echo -n "Reloading sfcb configuration: " killproc sfcbd -HUP && return 0 || return 1 } case "$1" in start) start ;; stop) stop ;; status) status sfcbd ;; restart) stop start ;; reload) reload ;; condrestart) [ -f /var/lock/subsys/sfcb ] && restart || : ;; *) echo "Usage: sfcb {start|stop|status|reload|restart|condrestart}" exit 1 ;; esac exit $? --- sfcb.init-redhat DELETED --- Index: Makefile.am =================================================================== RCS file: /cvsroot/sblim/sfcb/Makefile.am,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- Makefile.am 27 Apr 2005 03:10:39 -0000 1.15 +++ Makefile.am 27 Apr 2005 11:53:13 -0000 1.16 @@ -45,7 +45,7 @@ libsfcBasicAuthentication.la \ libsfcIndCIMXMLHandler.la -bin_PROGRAMS = \ +sbin_PROGRAMS = \ sfcbd libsfcBrokerCore_la_SOURCES = \ @@ -156,7 +156,8 @@ EXTRA_DIST=sfcb.cfg.pre.in sfcb.spec sfcbrepos.sh.in sfcbstage.sh.in \ - sfcbunstage.sh.in sfcb.init-redhat sfcb.init-suse sfcb.init-none \ + sfcbunstage.sh.in sfcb.init-redhat.in sfcb.init-suse.in \ + sfcb.init-none.in \ regressionTests doc dist_pkgdata_SCRIPTS=genSslCert.sh getSchema.sh @@ -168,24 +169,28 @@ dist_bin_SCRIPTS=wbemcat sfcbrepos: sfcbrepos.sh - sed s?$$\{prefix\}?$(prefix)?g $< > $@ + sed -e s?$$\{prefix\}?$(prefix)?g \ + -e s?$$\{exec_prefix\}?$(prefix)?g $< > $@ sfcbstage: sfcbstage.sh - sed s?$$\{prefix\}?$(prefix)?g $< > $@ + sed -e s?$$\{prefix\}?$(prefix)?g \ + -e s?$$\{exec_prefix\}?$(prefix)?g $< > $@ sfcbunstage: sfcbunstage.sh - sed s?$$\{prefix\}?$(prefix)?g $< > $@ + sed -e s?$$\{prefix\}?$(prefix)?g \ + -e s?$$\{exec_prefix\}?$(prefix)?g $< > $@ sfcb.cfg: sfcb.cfg.pre - sed s?$$\{prefix\}?$(prefix)?g $< > $@ + sed -e s?$$\{prefix\}?$(prefix)?g \ + -e s?$$\{exec_prefix\}?$(prefix)?g $< > $@ getSchema.sh: getSchema.sh.pre - sed s?$$\{prefix\}?$(prefix)?g $< > $@ + sed -e s?$$\{prefix\}?$(prefix)?g \ + -e s?$$\{exec_prefix\}?$(prefix)?g $< > $@ sfcb.init: sfcb.$(INIT_STYLE) - sed -e "s?@sysconfdir\@?$(sysconfdir)?g" \ - -e "s?@bindir\@?$(bindir)?g" \ - -e "s?@libdir\@?$(libdir)?g" $< > $@ + sed -e s?$$\{prefix\}?$(prefix)?g \ + -e s?$$\{exec_prefix\}?$(prefix)?g $< > $@ providerRegister: providerRegister.c touch $@ @@ -213,6 +218,8 @@ rm -f $(DESTDIR)$(sfcbstatedir)/stage/default.reg rm -f $(DESTDIR)$(sfcbdocdir)/* rm -f $(DESTDIR)$(initdir)/sfcb + -rmdir $(sysconfdir)/sfcb + -rmdir $(sfcbdocdir) clean-local: rm -f sfcbrepos sfcbstage sfcbunstage sfcb.cfg getSchema.sh sfcb.init Index: sfcb.spec.in =================================================================== RCS file: /cvsroot/sblim/sfcb/sfcb.spec.in,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- sfcb.spec.in 26 Apr 2005 17:17:39 -0000 1.8 +++ sfcb.spec.in 27 Apr 2005 11:53:13 -0000 1.9 @@ -4,7 +4,7 @@ # Package spec for @PACKAGE@ # -BuildRoot: /var/tmp/buildroot +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} Summary: Small Footprint CIM Broker Name: @PACKAGE_TARNAME@ @@ -65,6 +65,7 @@ echo "%{_sysconfdir}/init.d/sfcb" >> _pkg_list echo "%{_localstatedir}/lib/sfcb" >> _pkg_list echo "%{_bindir}/*" >> _pkg_list +echo "%{_sbindir}/*" >> _pkg_list echo "%{_libdir}/*.so*" >> _pkg_list echo ======================================= --- sfcb.init-suse DELETED --- Index: configure.ac =================================================================== RCS file: /cvsroot/sblim/sfcb/configure.ac,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- configure.ac 26 Apr 2005 13:23:55 -0000 1.9 +++ configure.ac 27 Apr 2005 11:53:13 -0000 1.10 @@ -133,5 +133,5 @@ AC_SUBST(MOFC_DIR) fi -AC_CONFIG_FILES([Makefile sfcb.spec sfcbrepos.sh sfcbstage.sh sfcbunstage.sh sfcb.cfg.pre getSchema.sh.pre]) +AC_CONFIG_FILES([Makefile sfcb.spec sfcbrepos.sh sfcbstage.sh sfcbunstage.sh sfcb.cfg.pre getSchema.sh.pre sfcb.init-redhat sfcb.init-suse sfcb.init-none]) AC_OUTPUT Index: sfcbrepos.sh.in =================================================================== RCS file: /cvsroot/sblim/sfcb/sfcbrepos.sh.in,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- sfcbrepos.sh.in 26 Apr 2005 17:17:39 -0000 1.6 +++ sfcbrepos.sh.in 27 Apr 2005 11:53:13 -0000 1.7 @@ -81,33 +81,48 @@ if [ -d $stagingdir ] && [ -f $stagingdir/default.reg ] && [ -f $cimschemadir/CIM_Schema.mof ] then - if rm -rf $registrationdir/repository.previous && - mv -f $registrationdir/repository $registrationdir/repository.previous && - mv -f $registrationdir/providerRegister $registrationdir/providerRegister.previous && - mkdir -p $registrationdir/repository/root/cimv2 && - cp $stagingdir/default.reg $registrationdir/providerRegister + if [ -d $registrationdir/repository ] then - if ls $stagingdir/regs/*.reg > /dev/null 2>&1 - then - if ! cat $stagingdir/regs/*.reg >> $registrationdir/providerRegister - then - echo Failed copying the registration files. >&2 - exit 1 - fi + rm -rf $registrationdir/repository.previous 2> /dev/null + mv -f $registrationdir/repository $registrationdir/repository.previous + if [ $? != 0 ] + then + echo "Failed to remove old repository" >&2 + exit 1 fi - if ls $stagingdir/mofs/*.mof > /dev/null 2>&1 + fi + if [ -f $registrationdir/providerRegister ] + then + mv -f $registrationdir/providerRegister $registrationdir/providerRegister.previous + if [ $? != 0 ] then - if ! sfcbmof -o $registrationdir/repository/root/cimv2/classSchemas -I $cimschemadir -i CIM_Schema.mof $stagingdir/mofs/*.mof - then - echo Failed compiling the MOF files. >&2 - exit 1 - fi + echo "Failed to remove old provider registry" >&2 + exit 1 fi - exit 0 - else - echo Failed to write sfcb registration files. >&2 + fi + mkdir -p $registrationdir/repository/root/cimv2 && + cp $stagingdir/default.reg $registrationdir/providerRegister + if [ $? != 0 ] + then + echo "Failed to create default repository and registry" >&2 exit 1 fi + if ls $stagingdir/regs/*.reg > /dev/null 2>&1 + then + if ! cat $stagingdir/regs/*.reg >> $registrationdir/providerRegister + then + echo Failed copying the registration files. >&2 + exit 1 + fi + fi + if ls $stagingdir/mofs/*.mof > /dev/null 2>&1 + then + if ! sfcbmof -o $registrationdir/repository/root/cimv2/classSchemas -I $cimschemadir -i CIM_Schema.mof $stagingdir/mofs/*.mof + then + echo Failed compiling the MOF files. >&2 + exit 1 + fi + fi else echo Could not find required staging files. Please check your setup. >&2 exit 1 --- sfcb.init-none DELETED --- |