|
|
|
@ -23,7 +23,7 @@ from time import sleep
|
|
|
|
|
import re
|
|
|
|
|
import sys
|
|
|
|
|
from cl_utils import runOsCommand,isMount,removeDir,typeFile,pathJoin, \
|
|
|
|
|
process
|
|
|
|
|
process,getRunCommands
|
|
|
|
|
from shutil import copyfile,copytree
|
|
|
|
|
from cl_template import _terms
|
|
|
|
|
from subprocess import Popen,PIPE,STDOUT
|
|
|
|
@ -366,17 +366,12 @@ class Distributive(object):
|
|
|
|
|
raise DistributiveError(_("Cann't copy") + " '%s' to '%s':\n%s"\
|
|
|
|
|
%(indir,outdir,str(e)))
|
|
|
|
|
|
|
|
|
|
def getRunCommands(self):
|
|
|
|
|
return map(lambda x:open('/proc/%s/cmdline'%x).read().strip(),
|
|
|
|
|
filter(lambda x:x.isdigit(),
|
|
|
|
|
os.listdir('/proc')))
|
|
|
|
|
|
|
|
|
|
def copy(self,fromdir,todir):
|
|
|
|
|
"""Copy files from 'fromdir' directory to 'todir' directory"""
|
|
|
|
|
def checkRsync():
|
|
|
|
|
try:
|
|
|
|
|
return len(filter(lambda x:"rsync\x00-a\x00-x" in x,
|
|
|
|
|
self.getRunCommands()))>2
|
|
|
|
|
getRunCommands()))>2
|
|
|
|
|
except:
|
|
|
|
|
return False
|
|
|
|
|
spin = Spinner()
|
|
|
|
|