summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-09 05:46:35 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-09 05:46:35 +0000
commite0acf06acb9f90df46a61dee2aedcbb0b18aa5d4 (patch)
tree2c2a0aff94ac40c05f1e0e994f0a35258330ddf4 /lib
parent6891c0c72944456e4a217553733a99faf9c2d6a0 (diff)
downloadruby-e0acf06acb9f90df46a61dee2aedcbb0b18aa5d4.tar.gz
ruby-e0acf06acb9f90df46a61dee2aedcbb0b18aa5d4.tar.xz
ruby-e0acf06acb9f90df46a61dee2aedcbb0b18aa5d4.zip
* parse.y (parser_prepare): set parser->enc from lex_input for ripper.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions
will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # Authors: Frank Ch. Eigler <fche@redhat.com> # # # This script refreshes WBEM/CIM MOF & REG files from the current PCP PMNS, # if necessary, and reloads the new MOF/REGs into the CIMMON. # # The PCP PMNS changes infrequently (when the sysadmin manuall installs or # removes pcp PMDA (agent) modules in /var/lib/pcp/pmdas/*). # # This script encodes the PCP->CIM metric name-mapping convention of replacing # dots with double-underscores, which lmi/pcp/metric.py will dutifully undo. _LOCALSTATEDIR=/var _DATADIR=/usr/share NAME=openlmi-providers PYTHON2_SITELIB=/usr/lib/python2.7/site-packages PCP_PMNS=$_LOCALSTATEDIR/lib/pcp/pmns/root PCP_HOST=${1-localhost} # or local:// for pcp 3.9+ BASEMOFFILE=$_DATADIR/$NAME/60_LMI_PCP.mof MOFREGDIR=$_LOCALSTATEDIR/lib/$NAME STAMPFILE=$MOFREGDIR/stamp MOFFILE=$MOFREGDIR/60_LMI_PCP_PMNS.mof REGFILE=$MOFREGDIR/60_LMI_PCP_PMNS.reg PROVIDER=$PYTHON2_SITELIB/lmi/pcp/metric.py VERSION=@OPENLMI_VERSION@ if [ ! -f $PROVIDER ]; then echo "Cannot find $PROVIDER" 1>&2 exit 1 fi set -e echo Refreshing PCP_Metric CIMMON classes from current PCP PMNS # quick liveness test pcp -h $PCP_HOST if [ -s $PCP_PMNS -a $PCP_PMNS -nt $STAMPFILE ]; then if [ -f $MOFFILE -a -f $REGFILE ]; then echo Unregistering $BASEMOFFILE echo Unregistering previous $MOFFILE echo Unregistering previous $REGFILE openlmi-mof-register unregister -v $VERSION $BASEMOFFILE $MOFFILE $REGFILE || : fi echo Generating $MOFFILE pminfo -h $PCP_HOST | sed -e 's,\.,__,g' | awk '{print "class PCP_Metric_" $1 " : PCP_MetricValue { } ;" }' > $MOFFILE echo Generating $REGFILE pminfo -h $PCP_HOST | sed -e 's,\.,__,g' | awk '{print "[PCP_Metric_" $1 "]" print " provider: '$PROVIDER'" print " location: pyCmpiProvider" print " type: instance" print " namespace: root/cimv2" print " group: pcp" print ""}' > $REGFILE echo Registering $BASEMOFFILE echo Registering new $MOFFILE echo Registering new $REGFILE openlmi-mof-register register -v $VERSION $BASEMOFFILE $MOFFILE $REGFILE 2>&1 | # filter out two noise diagnostics egrep -v 'Warning: the instance already exists.|In this implementation, that means it cannot be changed.' || : touch $STAMPFILE else echo Doing nothing, $PCP_PMNS older than $STAMPFILE fi