Move realization of cl_migrate users to calculate lib.

master
Mike Hiretsky 13 years ago
parent e37684488f
commit f8176a5462

@ -29,7 +29,7 @@ from cl_utils import isMount,typeFile,getTupleVersion,pathJoin,isFstabMount,\
FStab, lspci, getInstalledVideo,getDeviceType, \
getPartitionType, getOsProberHash, getProgPath, \
getRaidPartitions, getLvmPartitions, getLvmGroups, \
refreshLVM, refreshUdev
refreshLVM, refreshUdev, getPasswdUsers
from cl_distr import DistributiveRepository,PartitionDistributive
from cl_fill import clLocale
from operator import itemgetter
@ -1264,23 +1264,7 @@ class fillVars(object, glob_attr):
def get_cl_migrate_user(self):
"""migrate users"""
retList = []
fileName = "/etc/passwd"
if access(fileName, R_OK):
maxId = 65000
minId = 500
reNumb = re.compile("^\d+$")
lenData=7
userData = filter(lambda x: len(x)==lenData,
map(lambda x: x.rstrip().split(":"),
open(fileName)))
userData = filter(lambda x:\
reNumb.match(x[2]) and minId<=int(x[2])<=maxId,
userData)
sortUsers = map(lambda x: x[0], userData)
sortUsers.sort()
retList = ["root"] + sortUsers
return retList
return getPasswdUsers()
def get_cl_migrate_user_pwd(self):
retList = []

Loading…
Cancel
Save