Fix path for utils

master3.3
parent 334e4b260a
commit e6047a786e

@ -35,7 +35,7 @@ from calculate.lib.cl_print import color_print
from calculate.lib.cl_ldap import ldapUser
from calculate.lib.utils.ip import Pinger, isOpenPort, IPError
from calculate.lib.utils.files import (runOsCommand, getModeFile, removeDir,
isMount,pathJoin,tarLinks)
isMount, readFile, pathJoin, tarLinks)
from calculate.lib.utils.common import (getpathenv, appendProgramToEnvFile,
removeProgramToEnvFile)
from _cl_keys import getKey, clearKey
@ -838,7 +838,10 @@ class Client(commandServer, encrypt):
# upgrade user profile or create need profile directory
self.upgradeUserProfile(self.userName, self.homeDir, rpath)
# profile directory
fileConfig = os.path.join(self.homeDir, self.configFileServer)
pathProfile = os.path.join(rpath, osLinuxShort)
if not readFile(fileConfig).strip():
return True,pathProfile
fileSoftConfigThis = os.path.join(pathProfile,
self.configFileSoft)
fileSoftConfigCur = os.path.join(self.homeDir,

@ -1,5 +1,5 @@
#!/sbin/runscript
# Copyright 2008-2010 Calculate Ltd. http://www.calculate-linux.org
# Copyright 2008-2012 Calculate Ltd. http://www.calculate-linux.org
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -25,8 +25,7 @@ depend() {
variable_value()
{
local varname=$1
cl-client -vv --filter $varname |
sed -rn "s/^$varname\s+\[[rw]\]\s+(.*)$/\1/p"
cl-core-variables-show --only-value client.$varname
}
start() {

Loading…
Cancel
Save