develop
asamoukin 16 years ago
parent 845257ef0f
commit da98a3c93e

@ -1,70 +0,0 @@
#!/usr/bin/python
#-*- coding: utf-8 -*-
#Copyright 2008 Calculate Pack, http://www.calculate-linux.ru
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import sys
import os
sys.path.insert(0,os.path.abspath('/usr/lib/calculate/calculate-lib/pym'))
sys.path.insert(0,os.path.abspath('/usr/lib/calculate/calculate-client/pym'))
import cl_base
import cl_client
tr = cl_base.lang()
tr.setGlobalDomain('cl_client')
tr.setLanguage(sys.modules[__name__])
if __name__ == "__main__":
ldapObj = cl_client.cl_client("cl-client")
optObj = cl_client.tsOpt(ldapObj)
flagError = False
if not optObj.flagHelp:
if optObj.opt and optObj.opt.has_key('p'):
terms = optObj.opt['p'].split(",")
clVars = cl_base.DataVars()
clVars.flClient()
if terms == ["all"]:
clVars.printVars()
else:
clVars.printVars(terms)
#print
#print clVars.Get("cl_profile_path")
#print clVars.Get("setup_path_profinstall")
#clVars.Set("cl_profile_path","/tmp")
#print clVars.Get("setup_path_profinstall")
elif optObj.params.has_key('user'):
if optObj.opt and optObj.opt.has_key('m') and\
optObj.opt.has_key('s'):
flagError = ldapObj.createHome(optObj.opt['s'],
optObj.params['user'])
#if ldapObj.getLdapObjBind("movie"):
#print ldapObj.getUserMail(optObj.params['user'])
#print ldapObj.conLdap
#ldapObj.createClVars()
#ldapObj.clVars.printVars()
#import _cl_keys
#print _cl_keys.getKey(optObj.params['user'])
pass
else:
pass
#a.printVars(('path',))
#ldapObj.clVars.Write("setup_path_tmp", "sdfsdsfsdf11", True, 'remote')
#ldapObj.clVars.Write("soft_jabber_setup", 'test22', False,'local')
if flagError:
sys.exit(1)
else:
sys.exit(0)

@ -119,7 +119,6 @@ setup(
package_dir = {'calculate-client': "."},
packages = ['calculate-client.pym'],
data_files = data_files,
scripts=["./scripts/cl-client",
"./scripts/cl-createhome"],
scripts=["./scripts/cl-createhome"],
ext_modules = [module1],
)

Loading…
Cancel
Save