|
|
|
@ -1339,3 +1339,17 @@ def getPasswdUsers(minId=1000,maxId=65000):
|
|
|
|
|
sortUsers.sort()
|
|
|
|
|
retList = ["root"] + sortUsers
|
|
|
|
|
return retList
|
|
|
|
|
|
|
|
|
|
def getCmdLineParam(paramName):
|
|
|
|
|
"""Get value of param /proc/cmdline. If param not found then empty.
|
|
|
|
|
"""
|
|
|
|
|
cmdLine = '/proc/cmdline'
|
|
|
|
|
paramName = "%s="%paramName
|
|
|
|
|
params = \
|
|
|
|
|
map(lambda x:x.partition('=')[2],
|
|
|
|
|
filter(lambda x:x.startswith(paramName),
|
|
|
|
|
readFile(cmdLine).split(' ')))
|
|
|
|
|
if params:
|
|
|
|
|
return params[-1]
|
|
|
|
|
else:
|
|
|
|
|
return ""
|
|
|
|
|