1
0
OBS User unknown 2009-01-08 16:58:08 +00:00 committed by Git OBS Bridge
parent 18be56a819
commit f2d22b1221
3 changed files with 34 additions and 6 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Dec 23 10:27:17 MST 2008 - bwhiteley@suse.de
- Properly handle registration with Microsoft SCX cim server,
so scx upgrades don't break us.
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Oct 14 09:03:19 MDT 2008 - bwhiteley@suse.de Tue Oct 14 09:03:19 MDT 2008 - bwhiteley@suse.de

View File

@ -36,6 +36,7 @@ import os
import errno import errno
import sys import sys
from subprocess import call, PIPE, STDOUT, Popen from subprocess import call, PIPE, STDOUT, Popen
from getpass import getpass
import pywbem import pywbem
sfcb_init_script = '/etc/init.d/sfcb' sfcb_init_script = '/etc/init.d/sfcb'
@ -49,6 +50,7 @@ scx_init_script = '/etc/init.d/scx-cimd'
scx_cimserver_exe = scx_home + '/bin/scxcimserver' scx_cimserver_exe = scx_home + '/bin/scxcimserver'
scx_unix_socket = '/var' + scx_home + '/tmp/cim.socket' scx_unix_socket = '/var' + scx_home + '/tmp/cim.socket'
scx_provider_dir = scx_home + '/lib/providers' scx_provider_dir = scx_home + '/lib/providers'
scx_ext_dir = '/opt/microsoft/scx/lib/providers/ext'
if os.path.isdir('/usr/lib64/cmpi'): if os.path.isdir('/usr/lib64/cmpi'):
cmpi_dir = '/usr/lib64/cmpi' cmpi_dir = '/usr/lib64/cmpi'
@ -107,9 +109,9 @@ def process_sfcb(mof, stage, remove=False):
mofcomp = SimpleCompiler() mofcomp = SimpleCompiler()
files = [] files = []
files = mofcomp.compile_file(mof, None) files = mofcomp.compile_file(mof, None)
for file in files: for file_ in files:
dest = stage + '/mofs/' + file[0] dest = stage + '/mofs/' + file_[0]
src = file[1] src = file_[1]
if not remove: if not remove:
if not os.path.exists(dest): if not os.path.exists(dest):
os.makedirs(dest) os.makedirs(dest)
@ -233,6 +235,23 @@ def process_pegasus(mof, mofcomp, init_script, cimserver_exe, remove=False,
if inst.classname.lower() == 'pg_providermodule'] if inst.classname.lower() == 'pg_providermodule']
providers = list(set(providers)) providers = list(set(providers))
for reg in peg_regs:
dest = provider_dir + '/' + os.path.basename(reg)
if not dest.endswith('.mof'):
dest += '.mof'
if not remove:
if not os.path.exists(dest):
try:
os.symlink(reg, dest)
except OSError, e:
print e
else:
if os.path.islink(dest):
try:
os.unlink(dest)
except OSError, e:
print e
for provider in providers: for provider in providers:
libname = 'lib' + provider + '.so' libname = 'lib' + provider + '.so'
src = cmpi_dir + '/' + libname src = cmpi_dir + '/' + libname
@ -367,7 +386,7 @@ if __name__ == '__main__':
pegs.append({'url':scx_unix_socket, pegs.append({'url':scx_unix_socket,
'exe':scx_cimserver_exe, 'exe':scx_cimserver_exe,
'init':scx_init_script, 'init':scx_init_script,
'provider_dir':scx_provider_dir, 'provider_dir':scx_ext_dir,
'env':env, 'env':env,
}) })

View File

@ -1,7 +1,7 @@
# #
# spec file for package cmpi-provider-register (Version 1.0) # spec file for package cmpi-provider-register (Version 1.0)
# #
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -19,7 +19,7 @@
Name: cmpi-provider-register Name: cmpi-provider-register
Version: 1.0 Version: 1.0
Release: 1 Release: 2
License: BSD 3-Clause License: BSD 3-Clause
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
Group: System/Management Group: System/Management
@ -54,6 +54,9 @@ rm -rf "$RPM_BUILD_ROOT"
%defattr(-,root,root) %defattr(-,root,root)
/usr/sbin/* /usr/sbin/*
%changelog %changelog
* Tue Dec 23 2008 bwhiteley@suse.de
- Properly handle registration with Microsoft SCX cim server,
so scx upgrades don't break us.
* Tue Oct 14 2008 bwhiteley@suse.de * Tue Oct 14 2008 bwhiteley@suse.de
- Added license to script (bnc:434694) - Added license to script (bnc:434694)
- Don't fail if link destinations exist; only warn. - Don't fail if link destinations exist; only warn.