(self, container_id=None)
return found
Check container ROOT sanity
Check container ROOT sanity
Check container ROOT sanity
def _chk_container_root(self, container_id=None):
        """Check container ROOT sanity"""
        if container_id:
            container_dir = self.localrepo.cd_container(container_id)
        else:
            container_dir = self.localrepo.cd_container(self.container_id)
        if not container_dir:
            return 0
        container_root = container_dir + "/ROOT"
        check_list = ["/lib", "/bin", "/etc", "/tmp", "/var", "/usr", "/sys",
                      "/dev", "/data", "/home", "/system", "/root", "/proc", ]
        found = 0
        for f_path in check_list:
            if os.path.exists(container_root + f_path):
                found += 1
        return found
def _chk_container_root ( self , container_id = None ) : if container_id : container_dir = self . localrepo . cd_container ( container_id ) else : container_dir = self . localrepo . cd_container ( self . container_id ) if not container_dir : return 0 container_root = container_dir + "/ROOT" check_list = [ "/lib" , "/bin" , "/etc" , "/tmp" , "/var" , "/usr" , "/sys" , "/dev" , "/data" , "/home" , "/system" , "/root" , "/proc" , ] found = 0 for f_path in check_list : if os . path . exists ( container_root + f_path ) : found += 1 return found